/** * Get the element on the page that currently has focus. * * @return WebDriverElement */ public function getActiveElement() { try { return $this->driver->getActiveElement(); } catch (WebDriverException $exception) { $this->dispatchOnException($exception); } }