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

Breadcrumb

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

function Container::locate

Return JSON parameter for element / elements command

Parameters

string $using locator strategy:

string $value search target:

Return value

array

Throws

\WebDriver\Exception if invalid locator strategy

2 calls to Container::locate()
Container::parseArgs in vendor/lullabot/php-webdriver/lib/WebDriver/Container.php
Parse arguments allowing either separate $using and $value parameters, or as an array containing the JSON parameters
Container::__call in vendor/lullabot/php-webdriver/lib/WebDriver/Container.php
Magic method that maps calls to class methods to execute WebDriver commands

File

vendor/lullabot/php-webdriver/lib/WebDriver/Container.php, line 176

Class

Container
Abstract WebDriver\Container class

Namespace

WebDriver

Code

public function locate($using, $value) {
    if (!in_array($using, $this->strategies)) {
        throw WebDriverException::factory(WebDriverException::UNKNOWN_LOCATOR_STRATEGY, sprintf('Invalid locator strategy %s', $using));
    }
    return array(
        'using' => $using,
        'value' => $value,
    );
}
RSS feed
Powered by Drupal