class LegacyExecute
WebDriver\LegacyExecute class
@package WebDriver
Hierarchy
- class \WebDriver\AbstractWebDriver
- class \WebDriver\Execute extends \WebDriver\AbstractWebDriver
- class \WebDriver\LegacyExecute extends \WebDriver\Execute
- class \WebDriver\Execute extends \WebDriver\AbstractWebDriver
Expanded class hierarchy of LegacyExecute
File
-
vendor/
lullabot/ php-webdriver/ lib/ WebDriver/ LegacyExecute.php, line 19
Namespace
WebDriverView source
class LegacyExecute extends Execute {
/**
* {@inheritdoc}
*/
protected function methods() {
return array();
}
/**
* Inject a snippet of JavaScript into the page for execution in the context of the currently selected frame. (asynchronous)
*
* @param array{script: string, args: array} $jsonScript
*
* @return mixed
*/
public function async(array $jsonScript) {
$jsonScript['args'] = $this->serializeArguments($jsonScript['args']);
$result = $this->curl('POST', '/execute_async', $jsonScript);
return $this->unserializeResult($result['value']);
}
/**
* Inject a snippet of JavaScript into the page for execution in the context of the currently selected frame. (synchronous)
*
* @param array{script: string, args: array} $jsonScript
*
* @return mixed
*/
public function sync(array $jsonScript) {
$jsonScript['args'] = $this->serializeArguments($jsonScript['args']);
$result = $this->curl('POST', '/execute', $jsonScript);
return $this->unserializeResult($result['value']);
}
/**
* {@inheritdoc}
*/
protected function getIdentifierPath($identifier) {
return $this->url . $identifier;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
AbstractWebDriver::$curlService | private | property | Curl service | ||
AbstractWebDriver::$transientOptions | private | property | Transient options | ||
AbstractWebDriver::$url | protected | property | URL | ||
AbstractWebDriver::assertSerializable | private | function | Sanity check | ||
AbstractWebDriver::curl | protected | function | Curl request to webdriver server. | ||
AbstractWebDriver::getCurlService | public | function | Get curl service | ||
AbstractWebDriver::getRequestMethod | private | function | Get default HTTP request method for a given WebDriver command | ||
AbstractWebDriver::getTransientOptions | public | function | |||
AbstractWebDriver::getURL | public | function | Returns URL to Selenium server | ||
AbstractWebDriver::obsoleteMethods | protected | function | Return array of obsolete method names and corresponding HTTP request methods | 4 | |
AbstractWebDriver::offsetGet | private | function | Extract value from result | ||
AbstractWebDriver::setCurlService | public | function | Set curl service | ||
AbstractWebDriver::setTransientOptions | public | function | Set transient options | ||
AbstractWebDriver::__call | public | function | Magic method that maps calls to class methods to execute WebDriver commands | 1 | |
AbstractWebDriver::__construct | public | function | Constructor | 3 | |
AbstractWebDriver::__toString | public | function | Magic method which returns URL to Selenium server | ||
Execute::makeElement | protected | function | Factory method for elements | ||
Execute::serializeArguments | protected | function | Serialize script arguments (containing web elements and/or shadow roots) | ||
Execute::unserializeResult | protected | function | Unserialize result (containing web elements and/or shadow roots) | ||
LegacyExecute::async | public | function | Inject a snippet of JavaScript into the page for execution in the context of the currently selected frame. (asynchronous) | Overrides Execute::async | |
LegacyExecute::getIdentifierPath | protected | function | Overrides Execute::getIdentifierPath | ||
LegacyExecute::methods | protected | function | Return array of supported method names and corresponding HTTP request methods | Overrides Execute::methods | |
LegacyExecute::sync | public | function | Inject a snippet of JavaScript into the page for execution in the context of the currently selected frame. (synchronous) | Overrides Execute::sync |