public function PhantomJSDriver::find in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/jcalderonzumba/mink-phantomjs-driver/src/PhantomJSDriver.php \Zumba\Mink\Driver\PhantomJSDriver::find()
Finds elements with specified XPath query.
Parameters
string $xpath:
Return value
Throws
DriverException When the operation cannot be done
Overrides CoreDriver::find
File
- vendor/
jcalderonzumba/ mink-phantomjs-driver/ src/ PhantomJSDriver.php, line 150
Class
- PhantomJSDriver
- Class PhantomJSDriver @package Behat\Mink\Driver
Namespace
Zumba\Mink\DriverCode
public function find($xpath) {
$elements = $this->browser
->find("xpath", $xpath);
$nodeElements = array();
if (!isset($elements["ids"])) {
return null;
}
foreach ($elements["ids"] as $i => $elementId) {
$nodeElements[] = new NodeElement(sprintf('(%s)[%d]', $xpath, $i + 1), $this->session);
}
return $nodeElements;
}