2
我试图通过http://blog.likewise.org/2013/04/webdriver-testing-with-python-and-ghostdriver/工作。我的开发环境是win7上的USB驱动器。我已经phantomjs.exe上:试图在win7上设置硒/ phantomjs的路径
f:/phantomjs.exe
使用Python REPL我做的基础上,文章如下:
>>> from selenium import webdriver
>>> driver = webdriver.PhantomJS(executable_path="F:\phantomjs.exe")
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "F:\envs\r1\lib\site-packages\selenium\webdriver\phantomjs\webdriver.py", line 50, in __init__
self.service.start()
File "F:\envs\r1\lib\site-packages\selenium\webdriver\phantomjs\service.py", line 66, in start
raise WebDriverException("Unable to start phantomjs with ghostdriver.", e)
WebDriverException: Message: 'Unable to start phantomjs with ghostdriver.' ; Screenshot: available via screen
我怎样才能解决这个问题?
这个问题似乎是修正在硒2.42.1 – Loknar
为什么不把它作为一个答案? – user61629