/** * Close existing session * * @static * @return void */ public static function closeSession() { if (self::activeSessionExists()) { Menta_Events::dispatchEvent('before_session_close', array('session' => self::$session)); self::$session->close(); self::$session = NULL; Menta_Events::dispatchEvent('after_session_close'); } }
/** * Stops driver. */ public function stop() { if (!$this->wdSession) { throw new DriverException('Could not connect to a Selenium 2 / WebDriver server'); } $this->started = false; try { $this->wdSession->close(); } catch (\Exception $e) { throw new DriverException('Could not close connection'); } }
/** * Close the browser, once the test completes. * * @tearDown * @return void */ public function closeBrowser() { if ($this->session) { $this->session->close(); } }