Esempio n. 1
0
 public function get_all_next_elements($locator)
 {
     $payload = WebDriver::ParseLocator($locator);
     $response = $this->execute("POST", "/elements", $payload);
     $all_element_ids = WebDriver::GetJSONValue($response, "ELEMENT");
     $all_elements = array();
     foreach ($all_element_ids as $element_id) {
         $all_elements[] = new WebDriver_WebElement($this->driver, $element_id, $locator);
     }
     return $all_elements;
 }
 /**
  * @dataProvider invalid_selectors
  * @expectedException Exception
  */
 public function test_invalid_selectors($input)
 {
     WebDriver::ParseLocator($input);
 }
Esempio n. 3
0
 public function get_element($locator)
 {
     $payload = WebDriver::ParseLocator($locator);
     $response = $this->execute("POST", "/session/:sessionId/element", $payload);
     return new WebDriver_MockElement($this, $this->next_element_id++, $locator);
 }