website/docs/visual-testing/faq.md
save(Screen/Element/FullPageScreen) methods when I want to run check(Screen/Element/FullPageScreen)?No, you don't need to do this. The check(Screen/Element/FullPageScreen) will do this automatically for you.
You can update the baseline images through the command line by adding the argument --update-visual-baseline. This will
Usage:
npm run test.local.desktop --update-visual-baseline
When running logs info/debug mode you will see the following logs added
[0-0] ..............
[0-0] #####################################################################################
[0-0] INFO:
[0-0] Updated the actual image to
[0-0] /Users/wswebcreation/Git/wdio/visual-testing/localBaseline/chromel/demo-chrome-1366x768.png
[0-0] #####################################################################################
[0-0] ..........
It could be that the error Width and height cannot be negative is thrown. 9 out of 10 times this is related to creating an image of an element that is not in the view. Please be sure you always make sure the element in is in the view before you try to make an image of the element.
If you encounter issues with Canvas installation on Windows due to Node-Gyp errors, please note that this applies only to Version 4 and lower. To avoid these issues, consider updating to Version 5 or higher, which does not have these dependencies and uses Jimp for image processing.
If you still need to resolve the issues with Version 4, please check: