Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Ubuntu 20.04 - pycharm - Firefox not headless #964

Answered by mdmintz
motovmp1 asked this question in Q&A
Discussion options

Hello friends

Ubuntu 20.04 and pycharm

Chrome runs headless by default and --headless works also

But, Firefox always run in GUI mode even if I use --headless in CLI.

I want to run i headless mode

Thanks

VP

You must be logged in to vote

Hello @motovmp1 , based on the open ticket https://bugzilla.mozilla.org/show_bug.cgi?id=1688818 , there might be a Firefox bug with headless mode on Ubuntu 20.04 . The good news is that it works fine on Ubuntu 18.04 - See the Dockerfile: https://github.com/seleniumbase/SeleniumBase/blob/master/Dockerfile
If you find a workaround for headless Firefox on Ubuntu 20.04, please let me know.

Replies: 1 comment 4 replies

Comment options

Hello @motovmp1 , based on the open ticket https://bugzilla.mozilla.org/show_bug.cgi?id=1688818 , there might be a Firefox bug with headless mode on Ubuntu 20.04 . The good news is that it works fine on Ubuntu 18.04 - See the Dockerfile: https://github.com/seleniumbase/SeleniumBase/blob/master/Dockerfile
If you find a workaround for headless Firefox on Ubuntu 20.04, please let me know.

You must be logged in to vote
4 replies
Comment options

copy that!

Comment options

sudo apt-get install firefox xvfb
Install this one and works perfect!

pytest --headed -k test_login_page_dashboard_normal_user_analysis_visible --html=report.html --dashboard -s --demo --firefox --headless

Comment options

Awesome! So xvfb does the trick. That's why it's a requirement on the last line of the ReadMe in https://github.com/mdmintz/sbVirtualDisplay , which is used by SeleniumBase as a dependency to activate a virtual display in situations where the default headless mode of browsers doesn't work.

Comment options

Thanks a lot...cheers!

Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /