0

I have two images - one is a screenshot of my application; the other is a reference image. How can I compare the two of them to determine if they are the same?

  • 3
    And the question is? – Niels van Reijmersdal Jul 7 '15 at 11:38
  • i need ide commands – Ananth sandy Jul 7 '15 at 13:04
  • Wlecome to QA Stack Exchange :) What have you tried? Have you tried researching the IDE commands on Google? – Kevdog777 Jul 8 '15 at 8:38
  • Just a general question : Are you guyz still working on IDE to handle such scenarios? Can you use selenium web-driver for this ? – Gaurav Khanna Jul 8 '15 at 13:31
  • I didn't really understand your question here. In the first line there are 2 images, 1 screenshot and a fake image. What happens to the fake image then? Which one is the expected image? What application is it? why is it expecting an image? How does it decide which image is expected? – IAmMilinPatel Jul 10 '15 at 17:19
2

Selenium IDE does not provide a way to compare images. You can retrieve pixels from an image in Javascript, but only if the image is in a Canvas element.

I suspect you can find a command-line program that checks whether two images are identical. (It might be as simple as a byte-by-byte comparison of two files.) Some tools are more sophisticated; see for example this.

| improve this answer | |
1

I tried using image comparison before with Telerik Test Studio. It did the job, but my app at the time changed so much that it was too much effort to update the test with a new image. I am sure there are other tools out there, but I would only go after it if your image will remain fairly static.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.