Skip to content

Commit 0fa48e8

Browse files
authored
Allow to click and wait [N] seconds for reload (#998)
1 parent 9d1b5f7 commit 0fa48e8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Concerns/WaitsForElements.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,13 +335,14 @@ public function waitForReload($callback = null, $seconds = null)
335335
* Click an element and wait for the page to reload.
336336
*
337337
* @param string|null $selector
338+
* @param int|null $seconds
338339
* @return $this
339340
*/
340-
public function clickAndWaitForReload($selector = null)
341+
public function clickAndWaitForReload($selector = null, $seconds = null)
341342
{
342343
return $this->waitForReload(function ($browser) use ($selector) {
343344
$browser->click($selector);
344-
});
345+
}, $seconds);
345346
}
346347

347348
/**

0 commit comments

Comments
 (0)