Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Not sure if I'm even asking this question correctly, however, here goes.

I'm looking at validating images in an automation suite that I just started. I am currently validating the location via XPath and if the image is there by ensuring that the URI matches a predefined string while checking to ensure that the image is returning either 200 or 304. Is there any way to actually match the image however (I was kind of thinking file size, but there may be a better way).
I think that anyone who works on applications where code and content are handled by seperate teams will understand the reason for this question.

share|improve this question
are you looking for bit map comparison? – Tarun Jun 3 '11 at 15:50
Sorry about the late reply Tarun. I'm honestly really not certain what I'm looking for as I'm not completely certain on what the best way to do this would be. If I was doing this manually, yes I would be comparing the the actual image. I understand though that this may not be a great practice programmatically. – Lyndon Vrooman Jun 6 '11 at 5:06
up vote 2 down vote accepted

For image comparison I could suggest to use - captureScreenshotToString. So you could keep one copy as reference point while other captured run time and then comparing it with already saved copy. But as you said it is not "great practice programmatically."... Also you would have to simulate selenium 1 to use captureScreenshotToString api from selenium 2. For more on this look here -

share|improve this answer

SIKULI is a visual technology to automate and test graphical user interfaces (GUI) using images (screenshots). It stores the elements it comes across on the page in the form of bitmaps. It can be used for testing/comparison of images. Find more at

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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