Specify wait time for particular page

41 views
Skip to first unread message

Ben Frey

unread,
Aug 27, 2020, 10:21:31 AM8/27/20
to Geb User Mailing List
I have my configuration set up with

atCheckWaiting = true

waiting {
     timeout = 15
     retryInterval = 0.5
}

which works fine for most pages, but one at least is a long transition. I tried setting that page's at checker like this:

static at = {
waitFor(30) {
         $('.step5active').displayed
    }
}

which cause an interesting stack trace:

condition did not pass in 15 seconds (failed with exception)
geb.waiting.WaitTimeoutException: condition did not pass in 15 seconds (failed with exception)
.
.
.
Caused by: geb.waiting.WaitTimeoutException: condition did not pass in 30 seconds (failed with exception)

So I don't know which amount of time the page failed for. Should my setup work as I expect it to?

Thomas Hirsch

unread,
Aug 27, 2020, 10:25:44 AM8/27/20
to Geb User Mailing List
In this case you should also set 

    static atCheckWaiting=false

on the individual page where you want to have a longer wait.
This is because the at-checker is still wrapped in the 15 seconds wait, and if you perform a 30 seconds wait inside a 15 seconds wait, it will still fail after 15 seconds, the outer wait.

The stacktrace is merely printing how the waits are configured, and not how long did it actually wait.

Ben Frey

unread,
Aug 27, 2020, 10:34:49 AM8/27/20
to Geb User Mailing List
Ah, ok, that static line is what I was looking for. Thanks!

Marcin Erdmann

unread,
Aug 27, 2020, 1:56:08 PM8/27/20
to geb-...@googlegroups.com
Another option would be removing the waitFor() from within your at checker and using static atCheckWaiting = 30

--
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 geb-user+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/b31d9be5-5889-4754-8aed-4f2a46752dd9n%40googlegroups.com.

tho...@posteo.de

unread,
Aug 27, 2020, 6:44:12 PM8/27/20
to geb-...@googlegroups.com
+1 Marcin, I wasn't aware of that.
> [1].
>
> --
> 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 geb-user+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/geb-user/CA%2B52dQT8xNzGRxjokgvKsnme2gBvWLTECX7Bt_%3DQpy92gJGtyQ%40mail.gmail.com
> [2].
>
>
> Links:
> ------
> [1]
> https://groups.google.com/d/msgid/geb-user/b31d9be5-5889-4754-8aed-4f2a46752dd9n%40googlegroups.com?utm_medium=email&utm_source=footer
> [2]
> https://groups.google.com/d/msgid/geb-user/CA%2B52dQT8xNzGRxjokgvKsnme2gBvWLTECX7Bt_%3DQpy92gJGtyQ%40mail.gmail.com?utm_medium=email&utm_source=footer

Ben Frey

unread,
Aug 28, 2020, 2:18:22 PM8/28/20
to Geb User Mailing List
Yeah, I like that option.
Reply all
Reply to author
Forward
0 new messages