Sam,

The snapshot is indeed not taken exactly at the point of failure as it's
not technically possible. If you think about it, a failure occurs as a
result of a WebDriver command (which in fact is a HTTP request between test
JVM and a browser process) and a report is taken as a result of another
WebDriver command (HTTP request) or many thereof if both screenshot and
html reports are generated. Some time will obviously pass between these
requests and there is nothing stopping the browser form executing
javascript which modifies the page in that time.

The time between a failure and the reports being taken can be even
increased if your test performs any cleanup. This is because report taking
is implemented in cleanup method of GebReportingSpec which executes after
the cleanup method of a spec extending it.

On Thu, Oct 26, 2017 at 7:26 AM, Samuel Rossinovic <
[email protected]> wrote:

> Hi.
> Often when a test fails, the generated report ("test foo-failure.html")
> suggests the it shouldn't have: the missing content which caused the test
> to fail is actually in the page. Since the content in-question is added
> dynamically, I wonder: could it be that the failure snapshot is taken not
> at the point of failure, but slightly afterwards, and thus isn't a true
> reflection of the state of the DOM at the time of failure?
> Sam
>
> --
> You received this message because you are subscribed to the Google Groups
> "Geb User Mailing List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/geb-user/2101c3c8-57eb-4f4f-a8b1-cecf05a9e3fe%40googlegroups.com
> <https://groups.google.com/d/msgid/geb-user/2101c3c8-57eb-4f4f-a8b1-cecf05a9e3fe%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Geb 
User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/geb-user/CA%2B52dQQ-37YpeK2hRr5ud-iZkR8VjkLh7roikjYRAG8HzZTMvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to