Feb-25-2019, 01:40 PM
I follow this guideline here Set ChromeOption with RemoteDriver
So my code would like like:
So my code would like like:
sID = ch.get("session_id") sURL = ch.get("url") options = webdriver.ChromeOptions() ## options.add_argument('--headless') or options.add_argument('--no-startup-window') self.driver = webdriver.Remote(command_executor=sURL, desired_capabilities=options.to_capabilities()) self.driver.close() self.driver.quit() self.driver.session_id = sID self.newTab() self.switchLastTab()In both way, they still will launch a new browser window.