I’m on latest Katalon 8.4 atm.
I have been using the Web UI - Verify Image Present keyword and not sure why the tests are passing on some when to my mind they should be failing.
Even just a slight nudge or change in the image I thought would’ve caused the test to fail, but as you can see in many cases even some drastic changes the test quite happily passes.
Can we increase the precision for the image recognition such that even just a small change in a pixel would cause a failure?
Thanks, @edward.davies , I wasn’t aware of this problem.
@duyluong @nam.nguyen @vu.tran
If my understanding is correct,
verifyImagePresent() is a (yet another) poorly named API.
In all other cases, “verifying presence” is about checking for an element’s presence in the DOM – nothing at all to do with the content of the element. Yet…
The documentation for
WebUI.verifyImagePresent() requires the tester to provide a source image for comparison purposes, which has nothing at all to do with an element’s presence in the DOM.
Due to backwards compatibility and legacy code concerns, this can’t easily be fixed. What should happen is, two new APIs should be introduced, one specifically about presence in the DOM, and another that actually compares two images properly (since the current implementation is clearly broken). The existing API should be deprecated, since it’s both broken and doing the wrong thing.
@edward.davies sit tight. Let’s see what the devs say.
Alrite, thanks that completely makes sense now.
If it isn’t typically checking content but just a vague presence of the element it is kind of working.
Thanks ok let’s see what could be done, as I cannot use this keyword atm it’s too brittle.
I don’t know what it’s doing, but since it asks for a sample from your local disk, it can only need that for comparison purposes – hence it’s poorly named and broken (based on your evidence).
I was impressed by the 16 images of Google G Logo which you created for this time of examination.
This set of Google G Logo images could be a good fixture to verify various software components that compare images.
I tried to reproduce what you have done at my GitHub project. You can see the demo page
Just let me share a zip file that contains image files for those who might want to use for their own use: