/** * @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; }
protected function submitForm($selector) { $this->driver->findElement(WebDriverBy::cssSelector("{$selector}"))->submit(); }