/**
  * @param WebDriverBy $by
  * @return EventFiringWebElement
  * @throws WebDriverException
  */
 public function findElement(WebDriverBy $by) {
   $this->dispatch('beforeFindBy', $by, null, $this);
   try {
     $element = $this->newElement($this->driver->findElement($by));
   } catch (WebDriverException $exception) {
     $this->dispatchOnException($exception);
   }
   $this->dispatch('afterFindBy', $by, null, $this);
   return $element;
 }
Esempio n. 2
0
 protected function submitForm($selector)
 {
     $this->driver->findElement(WebDriverBy::cssSelector("{$selector}"))->submit();
 }