function ElementInterface::waitFor
Waits for a value to be available and returns it.
A falsy value returned by the callback is considered not found and will retry after some waiting time, until a value is found or the timeout is reached. When the timeout is reached, the falsy value of the last attempt is returned.
@template T
@phpstan-return T
Parameters
int|float $timeout Maximal allowed waiting time in seconds.:
callable(static): T $callback Callback, which result is both used as waiting condition and returned.: Will receive reference to `this element` as first argument.
Return value
mixed
1 method overrides ElementInterface::waitFor()
- Element::waitFor in vendor/
behat/ mink/ src/ Element/ Element.php - Waits for a value to be available and returns it.
File
-
vendor/
behat/ mink/ src/ Element/ ElementInterface.php, line 75
Class
- ElementInterface
- Element interface.
Namespace
Behat\Mink\ElementCode
public function waitFor($timeout, callable $callback);