I'm trying to run Selenium's Firefox webdriver and am getting the error below. I can see that the response
does not have a sessionId
- the offending line is self.session_id = response['sessionId']
- but I don't know why. I've run this in the following ways and get the same error:
- Cygwin, running nosetests
- Cygwin directly
- Windows, running nosetests
- Windows directly
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:devoolscygwinhome207013288devprojectsscorpionestunitest_
approve_workflows.py", line 27, in test_login
'password', userid='207013288', test=True)
File "C:devoolscygwinhome207013288devprojectsscorpionsrcworkflows.p
y", line 20, in login
browser = webdriver.Firefox()
File "C:devsdksPython33libsite-packagesselenium-2.32.0-py3.3.eggseleniu
mwebdriverfirefoxwebdriver.py", line 62, in __init__
desired_capabilities=capabilities)
File "C:devsdksPython33libsite-packagesselenium-2.32.0-py3.3.eggseleniu
mwebdriver
emotewebdriver.py", line 72, in __init__
self.start_session(desired_capabilities, browser_profile)
File "C:devsdksPython33libsite-packagesselenium-2.32.0-py3.3.eggseleniu
mwebdriver
emotewebdriver.py", line 116, in start_session
self.session_id = response['sessionId']
nose.proxy.KeyError: 'sessionId'
-------------------- >> begin captured logging << --------------------
selenium.webdriver.remote.remote_connection: DEBUG: POST http://127.0.0.1:63801/
hub/session {"sessionId": null, "desiredCapabilities": {"version": "", "browserN
ame": "firefox", "platform": "ANY", "javascriptEnabled": true}}
--------------------- >> end captured logging << ---------------------
I haven't used Selenium before and I'm not sure where to go from here.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…