protected function AwaitTrait::awaitExpression in Lightning Core 8.4
Same name and namespace in other branches
- 8.5 tests/contexts/AwaitTrait.inc \Acquia\LightningExtension\Context\AwaitTrait::awaitExpression()
- 8 tests/contexts/AwaitTrait.inc \Acquia\LightningExtension\Context\AwaitTrait::awaitExpression()
- 8.2 tests/contexts/AwaitTrait.inc \Acquia\LightningExtension\Context\AwaitTrait::awaitExpression()
- 8.3 tests/contexts/AwaitTrait.inc \Acquia\LightningExtension\Context\AwaitTrait::awaitExpression()
Waits for a JavaScript condition to become true.
Parameters
string $expression: The JavaScript expression to wait for.
int $timeout: (optional) How long, in seconds, to wait before timing out.
1 call to AwaitTrait::awaitExpression()
- AwaitTrait::awaitElement in tests/
contexts/ AwaitTrait.inc - Waits for an element to exist.
File
- tests/
contexts/ AwaitTrait.inc, line 25
Class
- AwaitTrait
- @internal This is an internal part of Lightning Core's testing system and may be changed or removed at any time without warning. It should not be extended, instantiated, or used in any way by external code! If you need to use this functionality,…
Namespace
Acquia\LightningExtension\ContextCode
protected function awaitExpression($expression, $timeout = 10) {
try {
$this
->getSession()
->wait($timeout * 1000, $expression);
} catch (UnsupportedDriverActionException $e) {
sleep($timeout);
}
}