Compare command failure
We are trying to automate the testing of our web app through Subject 7. This involves giving inputs to a text field through the Fill command and a locator. Screenshots are taken for the browser through the Screen_Shot command before and after giving inputs to the text field, as shown below:
After the field is filled and both screenshots are taken, we are using the Compare command to check that both screenshots are NOT equal, as shown below:
These are the exact two screenshots we are comparing:
1.
2.
The screenshots are not equal. However, the Compare command fails when the NOT_EQUAL operator is chosen:
But, the Compare command passes when the EQUAL operator is chosen. The two images are clearly NOT equal, why is the command failing? Any help with this problem is appreciated. Thank you.
Hi Joseph,
If the test case fails at any step, please do this small step manually in the website that opens:
-> Click on the "Quit" button found at the bottom of the screen. After clicking quit, a prompt will open, there click "Quit Exercise".
-> Run the script now, it should work. When the script fails, a sequence gets broken, so we need to quit in the website and start over for the next run.
Thank you.
Hi Tejasri,
We have added a new similarity threshold field on Compare command which can be used to set a difference the user expects to be suitable for image comparison. Since the images in the test case above are very similar, you could use 0.00 to 0.05 as a value for Threshold field. Please try to run your test case after making the necessary modifications to the step and let us know if you have any questions.
Regards,
Subject7 Team
Please sign in to leave a comment.