public function JavascriptEvaluationTest::testWait in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/behat/mink/driver-testsuite/tests/Js/JavascriptEvaluationTest.php \Behat\Mink\Tests\Driver\Js\JavascriptEvaluationTest::testWait()
File
- vendor/
behat/ mink/ driver-testsuite/ tests/ Js/ JavascriptEvaluationTest.php, line 20
Class
Namespace
Behat\Mink\Tests\Driver\JsCode
public function testWait() {
$this
->getSession()
->visit($this
->pathTo('/js_test.html'));
$waitable = $this
->findById('waitable');
$waitable
->click();
$this
->getSession()
->wait(3000, '$("#waitable").has("div").length > 0');
$this
->assertEquals('arrived', $this
->getAssertSession()
->elementExists('css', '#waitable > div')
->getText());
$waitable
->click();
$this
->getSession()
->wait(3000, 'false');
$this
->assertEquals('timeout', $this
->getAssertSession()
->elementExists('css', '#waitable > div')
->getText());
}