Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AbstractWebDriver.php

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

WebDriver

Code

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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal