Issues comparing two images taken from webdriver screenshot
Posted: 2015-01-14T18:17:37-07:00
Hiya,
I am using Selenium Webdriver on firefox to take screenshots of webpages. its known thing that webdriver takes screenshots in different sizes each time.
1) To overcome the size issue, i am using convert command in Imagemagick to set to standard size of 1024x1024!
2) When i compare the images now, i dont get any issues with Image size, but when same two images are compared, i see there is little offset and entire difference is shown in red. as if entire page is different.
- I am not sure how to upload Image here....
command
------------
compare -metric AE Image1.png Image1-copy.png Diff.png
Is there a way i can overcome such issues. please check attached snapshot for reference.
I am using Selenium Webdriver on firefox to take screenshots of webpages. its known thing that webdriver takes screenshots in different sizes each time.
1) To overcome the size issue, i am using convert command in Imagemagick to set to standard size of 1024x1024!
2) When i compare the images now, i dont get any issues with Image size, but when same two images are compared, i see there is little offset and entire difference is shown in red. as if entire page is different.
- I am not sure how to upload Image here....
command
------------
compare -metric AE Image1.png Image1-copy.png Diff.png
Is there a way i can overcome such issues. please check attached snapshot for reference.