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

"Selenium support for PhantomJS has been deprecated, please use headless versions of Chrome or Firefox instead" #48

Closed
hugovk opened this issue Mar 4, 2018 · 6 comments
Assignees

Comments

@hugovk
Copy link
Contributor

hugovk commented Mar 4, 2018

I have hundreds of mails on my server with this warning:

/usr/local/lib/python3.6/dist-packages/selenium/webdriver/phantomjs/webdriver.py:49: 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 '

(The PhantomJS repo is being archived: ariya/phantomjs#15344 There may be a fork soon: ariya/phantomjs#15345.)

Ideally diffengine should switch from PhantomJS to headless Chrome (eg.) or Firefox (or the fork), but it'd be good to silence this specific warning in the meantime.

@HoxinhLuo
Copy link

HoxinhLuo commented Sep 2, 2018

Here is a solution: https://stackoverflow.com/questions/48537028/selenium-how-to-use-headless-chrome-on-aws. It does work.

@RustamYasaviev
Copy link

Hi, but my rhel8 does not have "chromium-chromedriver". May be you know more about this solution this trouble? Thanks

@getmykhan
Copy link

getmykhan commented Sep 30, 2019

Use Warnings - https://docs.python.org/3/library/warnings.html

import warnings
warnings.filterwarnings('ignore')

@edsu
Copy link
Member

edsu commented Oct 4, 2019

I think this is the line that needs to change to switch over to headless Chrome or Firefox. Personally I would prefer Firefox if it's as easy as Chrome.

@kayiwa kayiwa self-assigned this Oct 4, 2019
@rmdes
Copy link

rmdes commented Nov 4, 2019

I'm trying to get around this issue on Ubuntu but I don't see how to switch to headless chrome, any advice would be very much appreciated.

@banezaka
Copy link

I'm trying to get around this issue on Ubuntu but I don't see how to switch to headless chrome, any advice would be very much appreciated.

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--headless')`

driver = webdriver.Chrome('chromedriver',chrome_options=chrome_options)
driver.get("http://www.google.com")

@edsu edsu closed this as completed in 022242e Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants