Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global AtCheckWaiting in combination with to:[...] leads to potentially long delays #594

leonard84 opened this issue Oct 7, 2019 · 0 comments


Copy link

@leonard84 leonard84 commented Oct 7, 2019

Hi I have this strange behavior when I call

class LoginPage extends BasePage {
    static content = {
        loginButton(to: [HomePage, MtanPage], toWait: true) { $(name: 'login') }

class MtanPage extends BasePage {
    static at = { submitButton.displayed }
    static content = {
         submitButton { $('input', value: 'Bestätigen') }

class HomePage extends MailerBasePage {
    static at = { $('p.intro-welcome').text() ==~ /.*Guten Tag.*/ }

It first checks the unexpected pages, with a FIND element call each,
then it retries the FIND for p.intro-welcome 196 times and then it
checks the second page FIND input[value=Bestätigen] and succeeds.


waiting {
    timeout = 30 + timeoutAddition

// Since SauceLabs is slower we need to enable atCheck waiting globally
atCheckWaiting = true

My guess is that, atCheckWaiting is performed for each Page in the to List individually.

IMHO at geb.Browser:1074
AtVerificationResult atVerificationResult = it.atVerificationResult should be
AtVerificationResult atVerificationResult = it.getAtVerificationResult(false)

And the global wait should be performed for the whole list, by
geb.navigator.DefaultNavigator#click(java.util.List, geb.waiting.Wait) instead. This issue gets worse with more entries in the list.

Furthermore, the unexpected pages should only be checked after the expected pages did not match, to be in line with the changes of geb/geb#127.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants