2

I'm trying to work through http://blog.likewise.org/2013/04/webdriver-testing-with-python-and-ghostdriver/. My development environment is a usb drive on win7. I have phantomjs.exe on:

f:/phantomjs.exe

Using the python REPL I have done the following based on the article:

>>> 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 

How can I fix this?

user1592380
  • 34,265
  • 92
  • 284
  • 515

1 Answers1

2

Following Can't run PhantomJS in python via Selenium, I uninstalled selenium from my virtualenv and ran:

pip install selenium==2.37

So far this has been working for me , although the above articles indicates there are some problems at least.

Community
  • 1
  • 1
user1592380
  • 34,265
  • 92
  • 284
  • 515