function Selenium2Driver::withSyn
Makes sure that the Syn event library has been injected into the current page, and return $this for a fluid interface,
$this->withSyn()->executeJsOnXpath($xpath, $script);
Return value
Throws
File
-
vendor/
lullabot/ mink-selenium2-driver/ src/ Selenium2Driver.php, line 241
Class
- Selenium2Driver
- Selenium2 driver.
Namespace
Behat\Mink\DriverCode
protected function withSyn() {
$hasSyn = $this->getWebDriverSession()
->execute(array(
'script' => 'return window.syn !== undefined && window.syn.trigger !== undefined',
'args' => array(),
));
if (!$hasSyn) {
$synJs = file_get_contents(__DIR__ . '/Resources/syn.js');
\assert($synJs !== false);
$this->getWebDriverSession()
->execute(array(
'script' => $synJs,
'args' => array(),
));
}
return $this;
}