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

Breadcrumb

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

function Container::elements

Find elements: /session/:sessionId/elements (POST) Find child elements: /session/:sessionId/element/:id/elements (POST) Search for multiple elements on page, starting from the document root.

Parameters

string $using the locator strategy to use:

string $value the search target:

Return value

array

Throws

\WebDriver\Exception if invalid XPath

File

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

Class

Container
Abstract WebDriver\Container class

Namespace

WebDriver

Code

public function elements($using = null, $value = null) {
    $locatorJson = $this->parseArgs('elements', func_get_args());
    $result = $this->curl('POST', '/elements', $locatorJson);
    if (!is_array($result['value'])) {
        return array();
    }
    return array_filter(array_map(array(
        $this,
        'makeElement',
    ), $result['value']));
}
RSS feed
Powered by Drupal