| 281 | |
| 282 | |
| 283 | class ChromeDriver(BrowserDriver): |
| 284 | @staticmethod |
| 285 | def _make_driver(): |
| 286 | from selenium.webdriver.chrome.options import Options |
| 287 | |
| 288 | options = Options() |
| 289 | options.add_argument("--headless") |
| 290 | options.add_argument("--no-sandbox") |
| 291 | driver = webdriver.Chrome(options=options) |
| 292 | driver.command_executor._client_config.timeout = 1200 |
| 293 | return driver |
| 294 | |
| 295 | def __init__(self, hostname, port): |
| 296 | super().__init__(hostname, port, self._make_driver()) |
| 297 | |
| 298 | def restart_browser(self): |
| 299 | self.driver.quit() |
| 300 | self.driver = self._make_driver() |
| 301 | self.driver.get(self.url) |
| 302 | self.driver.set_script_timeout(1200) |
| 303 | |
| 304 | |
| 305 | class FirefoxDriver(BrowserDriver): |
no outgoing calls
no test coverage detected