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
WebDriverCode
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']));
}