protected function findElementXpaths($xpath) {
    $elements = $this->browser->find("xpath", $xpath);
    $nodeXPaths = array();

    if (!isset($elements["ids"])) {
      return array();
    }

    foreach ($elements["ids"] as $i => $elementId) {
      $nodeXPaths[] = sprintf('(%s)[%d]', $xpath, $i + 1);
    }
    return $nodeXPaths;
  }
protected function findElementXpaths($xpath) {
    $elements = $this->browser->find("xpath", $xpath);
    $nodeXPaths = array();

    if (!isset($elements["ids"])) {
      return array();
    }

    foreach ($elements["ids"] as $i => $elementId) {
      $nodeXPaths[] = sprintf('(%s)[%d]', $xpath, $i + 1);
    }
    return $nodeXPaths;
  }
protected function findElementXpaths ( $ xpath ) { $ elements = $ this -> browser -> find ( "xpath" , $ xpath ) ; $ nodeXPaths = array ( ) ; if ( ! isset ( $ elements [ "ids" ] ) ) { return array ( ) ; } foreach ( $ elements [ "ids" ] as $ i => $ elementId ) { $ nodeXPaths [ ] = sprintf ( '(%s)[%d]' , $ xpath , $ i + 1 ) ; } return $ nodeXPaths ; }
Finds elements with specified XPath query.
@param string $xpath
@return string[]
@throws DriverException                  When the operation cannot be done
Finds elements with specified XPath query .