Skip to content

Conversation

@u01jmg3
Copy link
Contributor

@u01jmg3 u01jmg3 commented Jan 3, 2022

Document clickAndWaitForReload()

I chose not to keep the waitForReload() example as I couldn't think of a scenario where it wouldn't be combined with a preceding click event.

@SjorsO
Copy link
Contributor

SjorsO commented Jan 4, 2022

I just tried it, the current example doesn't work very well:

// This seems to only work if your application is slow
$browser->click('.some-action')
    ->waitForReload()

// This works every time
$browser->waitForReload(function (Browser $browser) {
    $browser->click('.some-action');
}); 

@taylorotwell taylorotwell merged commit 9994ea5 into laravel:8.x Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants