I would like to set up tests to determine if my website has been defaced. In particular I want to check that certain images are really the correct images. So, I am not sure how to do two things:
- How to compare two images and determine if they are the same or not
- Whether the reference image to which the scraped imaged is compared needs to be itself recorded with a storeImage command, or if it must be provided by some other means.
I consider that any change at all is unwonted and signifies a problem to fix.
In other words, I would like to use logic like:
store (?) something reference_image storeImage some_xpath displayed_image if displayed_image == reference_image echo All is well else echo Displayed image does not match reference image end
…but I don’t know if this approach is possible.