How to develop cross browser tests using image validation
Posted: Thu Jun 15, 2017 1:16 pm
Hello,
Our SUT includes responsive WebApp, AndroidApp and IOSApp.
We lately tried to write a scenario where we have to check that an icon within a button field
is replaced by a similar icon with a checkmark on it.
(ignore the color)
The icon does not have any id, the button has.
Depending on the environnement, size/resolution are different, so the test we wrote runs successfully in one context, but not in the others.
How should we write our comparison to be portable ?
Is it possible to getsize/resize images before comparison ?
Our SUT includes responsive WebApp, AndroidApp and IOSApp.
We lately tried to write a scenario where we have to check that an icon within a button field
is replaced by a similar icon with a checkmark on it.
(ignore the color)
The icon does not have any id, the button has.
Depending on the environnement, size/resolution are different, so the test we wrote runs successfully in one context, but not in the others.
How should we write our comparison to be portable ?
Is it possible to getsize/resize images before comparison ?