Answer the question
In order to leave comments, you need to log in
Python Selenium, why does WebDriver freeze when switching to second tab?
Good morning, I create a driver:
class ChromeBrowser(BaseBrowser, IBrowser):
def create_driver(self):
options = ChromeOptions()
options.add_argument('--headless')
options.add_argument('--disable-gpu')
self.driver = Chrome(chrome_options=options)
def close_driver(self):
self.driver.close()
login = self.browser.driver.find_element_by_css_selector("input[id='login']")
password = self.browser.driver.find_element_by_css_selector("input[id='passwd']")
self.browser.driver.switch_to.window(self.browser.driver.window_handles[1])
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question