Can anyone share any sample code to use eyes for visual testing. I am getting error on eyes.init(). it is asking for applitools settings.
|// add WinAppDriver script|
|web.type(‘id=searchBar’, ‘Agile Testing’)|
|eyes.checkWindow(‘Agile Testing Books 1’)|
Got it from the sample project
Thank you Eran for your reply, I have tried that but got following error:
“beforeCommand” hook failed:Hook does not exist: beforeCommand
MODULE_NOT_INITIALIZED_ERROR - Missing eyes.init() at /Users/…/Downloads/oxygen-master/tests/visual.js line 10
“afterCommand” hook failed:Hook does not exist: afterCommand
Test failed: [MODULE_NOT_INITIALIZED_ERROR] “Missing eyes.init()” at //oxygen-master/tests/visual.js line 10
Test finished with status --> FAILED.
when I used : eyes.init(‘web’);
then I am getting following error:
UNKNOWN_ERROR - Error: dlopen(/Applications/Oxygen.app/Contents/Resources/app.asar.unpacked/node_modules/canvas/build/Release/canvas.node, 1): Library not loaded: /usr/local/opt/jpeg/lib/libjpeg.9.dylib
Have you defined an Applitools account?
In the IDE you can define it through the settings button on the right
In CLI you define it in the project settings