在Windows上我想试试selenium的webdriver扩展,我收到一个错误。我在安装页面上安装了python绑定。然后我尝试着以下几点:
from selenium import webdriver
browser = webdriver.Firefox()
Firefox(15.0)打开,之后发生异常:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\selenium-2.32.0-py2.7.egg\selenium\webdriver\firefox\webdriver.py", line 62, in __init__
desired_capabilities=capabilities)
File "C:\Python27\lib\site-packages\selenium-2.32.0-py2.7.egg\selenium\webdriver\remote\webdriver.py", line 72, in __init__
self.start_session(desired_capabilities, browser_profile)
File "C:\Python27\lib\site-packages\selenium-2.32.0-py2.7.egg\selenium\webdriver\remote\webdriver.py", line 114, in start_session
'desiredCapabilities': desired_capabilities,
File "C:\Python27\lib\site-packages\selenium-2.32.0-py2.7.egg\selenium\webdriver\remote\webdriver.py", line 165, in execute
self.error_handler.check_response(response)
File "C:\Python27\lib\site-packages\selenium-2.32.0-py2.7.egg\selenium\webdriver\remote\errorhandler.py", line 152, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: ''
我尝试了同样的没有webdriver,使用1.0 api然后我可以打开Firefox并转到特定页面,但是使用webdriver的情况我没有任何运气。有谁知道我做错了什么? 我的操作系统是Windos 7,64位版本。 我也尝试使用版本控制的最新python绑定,但是它有同样的错误。