Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhantomJS support depreciated in Selenium- Remove support? #14

nshores opened this issue Apr 10, 2018 · 2 comments


None yet
2 participants
Copy link

commented Apr 10, 2018

PhantomJS does not function correctly in the bundled version, or current version of Selenium in a Linux environment. It is still working on windows, but I suggest removing support for it entirely to keep version conflicts between OS at a minimum. A timeout occurs when called, as well as a warning.

Taceback (most recent call last):
  File "/home/nshores/.local/lib/python3.5/site-packages/myusps/", line 180, in _login
    WebDriverWait(driver, LOGIN_TIMEOUT).until(EC.title_is(WELCOME_TITLE))
  File "/home/nshores/.local/lib/python3.5/site-packages/selenium/webdriver/support/", line 80, in until
    raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message: 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/nshores/.local/lib/python3.5/site-packages/myusps/", line 300, in get_session
  File "/home/nshores/.local/lib/python3.5/site-packages/myusps/", line 182, in _login
    raise USPSError('login failed')
myusps.USPSError: login `failed

By default myusps.get_session is passing ('driver='phantomjs') unless otherwise specified by invocation. I believe we should remove support for PhantomJS entirley but defaulting to Chrome, and removing the check in _get_driver(driver_type): . I will be submitting a pull request shortly.


This comment has been minimized.

Copy link

commented Apr 16, 2018

PhantomJS should only be used for RaspberryPi users since Selenium isn't available as far as I understand as you can see a note from @happyleavesaoc here.


This comment has been minimized.

Copy link
Contributor Author

commented Apr 16, 2018

PhantomJS is a web driver that Selenium can use. In the current setup, Selenium is used for authentication and cookie creation regardless of web driver (Chrome or PhantomJS). It appears with the current build of Selenium PhantomJS support is not working at all, plus we have an official note from the deverloper of PhantomJS that he is stepping down --!topic/phantomjs/9aI5d-LDuNE

There's also a note when you run Selenium about the same thing.

/usr/local/lib/python3.6/dist-packages/selenium/webdriver/phantomjs/ UserWarning: Selenium support for Phantom
JS has been deprecated, please use headless versions of Chrome or Firefox instead
  warnings.warn('Selenium support for PhantomJS has been deprecated, please use headless '

There's no reason we shouldn't be able to use headless chrome on any Rasberry pi running Rasbian. There's a quick start here on how to use it -

@nshores nshores changed the title PhantomJS support depreciated in linux - Remove support? PhantomJS support depreciated in Selenium- Remove support? Apr 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.