Skip to content

Commit

Permalink
Allow to click and wait [N] seconds for reload (#998)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabio-ivona authored Sep 15, 2022
1 parent 9d1b5f7 commit 0fa48e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Concerns/WaitsForElements.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,14 @@ public function waitForReload($callback = null, $seconds = null)
* Click an element and wait for the page to reload.
*
* @param string|null $selector
* @param int|null $seconds
* @return $this
*/
public function clickAndWaitForReload($selector = null)
public function clickAndWaitForReload($selector = null, $seconds = null)
{
return $this->waitForReload(function ($browser) use ($selector) {
$browser->click($selector);
});
}, $seconds);
}

/**
Expand Down

0 comments on commit 0fa48e8

Please sign in to comment.