function AbstractWebDriver::getRequestMethod
Get default HTTP request method for a given WebDriver command
Parameters
string $webdriverCommand:
Return value
string
Throws
\WebDriver\Exception if invalid WebDriver command
1 call to AbstractWebDriver::getRequestMethod()
- AbstractWebDriver::__call in vendor/
lullabot/ php-webdriver/ lib/ WebDriver/ AbstractWebDriver.php - Magic method that maps calls to class methods to execute WebDriver commands
File
-
vendor/
lullabot/ php-webdriver/ lib/ WebDriver/ AbstractWebDriver.php, line 346
Class
- AbstractWebDriver
- Abstract WebDriver\AbstractWebDriver class
Namespace
WebDriverCode
private function getRequestMethod($webdriverCommand) {
if (!array_key_exists($webdriverCommand, $this->methods())) {
throw WebDriverException::factory(array_key_exists($webdriverCommand, $this->obsoleteMethods()) ? WebDriverException::OBSOLETE_COMMAND : WebDriverException::UNKNOWN_COMMAND, sprintf('%s is not a valid WebDriver command.', $webdriverCommand));
}
$methods = $this->methods();
$requestMethods = (array) $methods[$webdriverCommand];
return array_shift($requestMethods);
}