applitools / eyes.selenium.python

Applitools Eyes SDK for Selenium Python WebDriver
Apache License 2.0
10 stars 9 forks source link

Fixed window size comparison being invalid when dictionary contains extra info #1

Closed tamzinselvi closed 7 years ago

tamzinselvi commented 7 years ago

Getting window size from selenium driver returns:

{"width":1024,"hCode":4194304,"class":"org.openqa.selenium.Dimension","height":768}

Which compared to:

{"width": 1024, "height": 768}

Returns false.

This PR addresses this by instead directly comparing the height & width components without comparing other fields in the dictionary (such as class / hCode). This could be done in other ways as well but this was the least frictional. This is certainly a defect that has prohibited us @ TE2 from capturing images using Robot-AppEyes on all browser except Chrome (who doesn't include the other information).

danielputerman commented 7 years ago

Nice catch! Thanks!

danielputerman commented 7 years ago

The fix is available as part of version 3.5 of eyes-selenium.