/** * @return $this * @throws WebDriverException */ public function close() { try { $this->driver->close(); return $this; } catch (WebDriverException $exception) { $this->dispatchOnException($exception); } }
/** * Closes the WebDriver session. * * @return $this */ private function _closeWebDriver() { if ($this->webDriver instanceof RemoteWebDriver) { $this->output('Close WebDriver session'); $this->webDriver->close()->quit(); $this->webDriver = null; } return $this; }