You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pre requisite : The expected screenshot is already saved by playwright in the respective folder for comparison
1.Write a code for screenshot comparison of a particular locator in webpage.
e.g. expect (await page.locator("[class='map-goal']")).screenshot('actual-map-screenshot.png')).toMatchSnapshot('expected-map-screenshot',{threshold :0.2})
Expected behavior
It should allow a threshold upto 0.2
Actual behavior
it's failing at Threshold of 0.02
Error is : Expected an image 616px by 375px, received 615px by 374px. 4497 pixels (ratio 0.02 of all image pixels) are different.
Additional context
No response
Environment
Both Mac & Windows latest
The text was updated successfully, but these errors were encountered:
Version
1.49.1
Steps to reproduce
Pre requisite : The expected screenshot is already saved by playwright in the respective folder for comparison
1.Write a code for screenshot comparison of a particular locator in webpage.
e.g. expect (await page.locator("[class='map-goal']")).screenshot('actual-map-screenshot.png')).toMatchSnapshot('expected-map-screenshot',{threshold :0.2})
Expected behavior
It should allow a threshold upto 0.2
Actual behavior
it's failing at Threshold of 0.02
Error is : Expected an image 616px by 375px, received 615px by 374px. 4497 pixels (ratio 0.02 of all image pixels) are different.
Additional context
No response
Environment
Both Mac & Windows latest
The text was updated successfully, but these errors were encountered: