public function BrowserKitDriver::findElementXpaths in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php \Behat\Mink\Driver\BrowserKitDriver::findElementXpaths()
Finds elements with specified XPath query.
Parameters
string $xpath:
Return value
string[] The XPath of the matched elements
Throws
UnsupportedDriverActionException When operation not supported by the driver
Overrides CoreDriver::findElementXpaths
See also
find()
File
- vendor/
behat/ mink-browserkit-driver/ src/ BrowserKitDriver.php, line 322
Class
- BrowserKitDriver
- Symfony2 BrowserKit driver.
Namespace
Behat\Mink\DriverCode
public function findElementXpaths($xpath) {
$nodes = $this
->getCrawler()
->filterXPath($xpath);
$elements = array();
foreach ($nodes as $i => $node) {
$elements[] = sprintf('(%s)[%d]', $xpath, $i + 1);
}
return $elements;
}