selenium启动火狐浏览器打开百度首页,报错
火狐版本47.0.2,selenium是3.0.2Traceback(mostrecentcalllast):File"D:/untitled/13.py",line5,...
火狐版本47.0.2,selenium是3.0.2
Traceback (most recent call last):
File "D:/untitled/13.py", line 5, in <module>
driver = webdriver.Firefox()
File "D:\Program Files (x86)\Python2.7\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 150, in __init__
keep_alive=True)
File "D:\Program Files (x86)\Python2.7\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 92, in __init__
self.start_session(desired_capabilities, browser_profile)
File "D:\Program Files (x86)\Python2.7\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 180, in start_session
self.session_id = response['sessionId']
KeyError: 'sessionId' 展开
Traceback (most recent call last):
File "D:/untitled/13.py", line 5, in <module>
driver = webdriver.Firefox()
File "D:\Program Files (x86)\Python2.7\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 150, in __init__
keep_alive=True)
File "D:\Program Files (x86)\Python2.7\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 92, in __init__
self.start_session(desired_capabilities, browser_profile)
File "D:\Program Files (x86)\Python2.7\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 180, in start_session
self.session_id = response['sessionId']
KeyError: 'sessionId' 展开
展开全部
pip install -U selenium
更新一下selenium
如果当前目录下有selenium目录,请更新一下,或删除掉
更新geckodriver.exe
更新一下selenium
如果当前目录下有selenium目录,请更新一下,或删除掉
更新geckodriver.exe
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询