Рет қаралды 1,609
In UI automation comparing two screenshots or images is very much needed. Till now with most of the tools like Selenium, Puppeteer, etc it was difficult to do. But now using playwright it is very easy to compare two screenshots. Playwright assertion provides the "tohaveScreenshot()" method to compare the screenshots. If you don't have any generated screenshots to compare, it will compare the new one first, and then in the next runs, it compare it with the screenshot taken.
Also, It generates different screenshots for Chrome, Firefox, or Webkit and also for different OS like Linux, Mac, and Windows.
Note that this screenshot comparison will only work with the playwright runner.
In this video, we will talk
1. how to take and compare two full-page screenshots
2. how to take and compare screenshots from specific parts of the page?
3. Live demo, tips and tricks.
#playwright #automationtesting #softwaretesting
If you are QA and want to stay updated and learn something new, please Subscribe to this channel.
Blog Link - www.softwaretestingtipsandtric...
Follow-
Facebook- / softwarebughunters
Twitter- / bughunterspro
Reddit - / bughunters