wttech / aet

AET - a system that detects visual changes on web sites and performs basic page health checks
https://wttech.blog/open-source/
Apache License 2.0
146 stars 49 forks source link

Add fallback for screen comparator with selector #100

Open bamanczak opened 7 years ago

bamanczak commented 7 years ago

When I use

<open/>
<click xpath="selector-to-a-button-that-opens-an-overlay" timeout="5000"/>
<screen name="Desktop" css'"selector-to-an-overlay"/>

and the overlay fails to open then I receive a "Processing error" that indicates that AET were unable to take the screenshot.

It would be useful to have a fallback: if screen with selector fails, then simply take a screenshot of whole page (it would be simpler to debug the issue by a not experienced QA)

malaskowski commented 7 years ago

Is that really helpful to have a screenshot of another area than we actually wanted? I think this is rather confusing unless e.g. we always say that in such case the 'collection' has ERROR status.

bamanczak commented 7 years ago

Yes. The current situation is cery confusing. Domek people think that AET crashed when they see this error.

I would prefer to have error AND screenshot as IT makes debugging quicker. What happenened? Did page bot open? Was the element there but bot fully loaded? Was there a loader displayed? Currently debugging the issue od bot do straightforward, especially since AET are often needed for quick feedback (eg during release) without enough time to investigate everything.

In some places we ditched this functionality quickly and decided to use hides instead.

bamanczak commented 7 years ago

A smaller improvement to consider: even if the test fails, let's display the pattern. Currently the pattern is not displayed, just the error message.

Pattern would make it easy to see what was supposed to be tested and what should I retest by hand.

radeklawgmin commented 7 years ago

it looks like the issue will be addressed as a part of https://github.com/Cognifide/aet/issues/134