function Session::execute
script execution method chaining, e.g.,
- $session->execute($jsonScript) - fallback for legacy JSON Wire Protocol
- $session->execute()->method() - chaining
Return value
mixed
File
-
vendor/
lullabot/ php-webdriver/ lib/ WebDriver/ Session.php, line 525
Class
- Session
- WebDriver\Session class
Namespace
WebDriverCode
public function execute() {
// execute script
if (func_num_args() > 0) {
$execute = $this->w3c ? new Execute($this->url . '/execute') : new LegacyExecute($this->url);
$result = $execute->sync(func_get_arg(0));
return $result;
}
// W3C method chaining
return new Execute($this->url . '/execute');
}