public function JavascriptEvaluationTest::testExecuteScript in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/behat/mink/driver-testsuite/tests/Js/JavascriptEvaluationTest.php \Behat\Mink\Tests\Driver\Js\JavascriptEvaluationTest::testExecuteScript()
@dataProvider provideExecutedScript
File
- vendor/
behat/ mink/ driver-testsuite/ tests/ Js/ JavascriptEvaluationTest.php, line 38
Class
Namespace
Behat\Mink\Tests\Driver\JsCode
public function testExecuteScript($script) {
$this
->getSession()
->visit($this
->pathTo('/index.html'));
$this
->getSession()
->executeScript($script);
sleep(1);
$heading = $this
->getAssertSession()
->elementExists('css', 'h1');
$this
->assertEquals('Hello world', $heading
->getText());
}