kazurayam / inspectus

The Inspectus library enables automated UI tests in Java/Groovy to perform "Visual Inspection" on top of the "materialstore"
Apache License 2.0
0 stars 0 forks source link

[New Feature] a method that takes Element screenshot and immediately compare with a Material in the "store" #106

Open kazurayam opened 9 months ago

kazurayam commented 9 months ago

There was an interesting discussion here:

https://forum.katalon.com/t/verify-image-and-take-screen-shot-keyword-doesnt-work/108573/4

The thing is img src is not reliable… because it never verifies the actual img… i’ve tried that. i’ve done bunch of testing around an img and at no point any of the test method actually verifies/compares the img. The reason <img src=> is not reliable is because if an image renders blurry or broken in the UI, the test will not fail since it’s only checking the img src.

The poster wants to take a screenshot of an HTML element and immediately compare with some other image he prepared; if the pair of images differes, he wants his test to fail and give warning message.

The current version of the inspectus library is designed as a batch processing that works post festum (after the feast, after the UI-interactions finished). I need to add some API to allow taking a Element screenshot and comparing with previous one immediately.

I think that the inspectus library has already equipped necessary components to work as a verification function that could be called during a UI test is running.