protected function AwaitTrait::awaitExpression in Lightning Core 8.2
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.3 tests/contexts/AwaitTrait.inc \Acquia\LightningExtension\Context\AwaitTrait::awaitExpression()
- 8.4 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 18
Class
Namespace
Acquia\LightningExtension\ContextCode
protected function awaitExpression($expression, $timeout = 10) {
try {
$this
->getSession()
->wait($timeout * 1000, $expression);
} catch (UnsupportedDriverActionException $e) {
sleep($timeout);
}
}