刚刚安装上python3.7,进入百度之后定位不到元素:
selenium.common.exceptions.NoSuchWindowException: Message: Currently focused window has been closed.
全部错误如下:
C:\Users\leizh\AppData\Local\Programs\Python\Python37\python.exe C:/Users/leizh/PycharmProjects/test1/test2.py
Traceback (most recent call last):
File “C:/Users/leizh/PycharmProjects/test1/test2.py”, line 6, in
driver.find_element_by_id(“kw”).send_keys(“Selenium”)
File “C:\Users\leizh\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py”, line 360, in find_element_by_id
return self.find_element(by=By.ID, value=id_)
File “C:\Users\leizh\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py”, line 978, in find_element
‘value’: value}
selenium.common.exceptions.NoSuchWindowException: Message: Currently focused window has been closed.
最新推荐文章于 2024-05-24 15:43:21 发布