/** * Initialize the remove web driver. * * @return $this|TestSuite Same instance for chained method calls. */ private function _initWebDriver() { try { if (null === $this->webDriver) { $this->webDriver = RemoteWebDriver::create($this->suiteSettings->getSeleniumHost(), $this->suiteSettings->getCapabilities()); } } catch (WebDriverCurlException $e) { $this->_initSqlLogger(); $this->sqlLogger->initError(); exit("\n[41mFailed to initialize the remote web driver, there is may be a problem with the browser driver.\n" . $e->getMessage() . "[0m\n\n"); } catch (\Exception $e) { $this->_initSqlLogger(); $this->sqlLogger->initError(); exit("\n[41mException while the web driver is instantiating.\n" . $e->getMessage() . "[0m\n\n"); } return $this; }