-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
bugUh oh... Something needs to be fixedUh oh... Something needs to be fixed
Description
I'd like to basically reopen #701 : even if --headless is set (moreover, it should be default on Linux), it has no effect.
geckodriver.log reads:
1609613050327 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofile0dBR8Z"
Using FirefoxOptions.headless (see the PoC patch below) works for me, but AFAICT it should be applied to more places (?), and not sure how that plays together with firefox_capabilities:
--- a/seleniumbase/core/browser_launcher.py
+++ b/seleniumbase/core/browser_launcher.py
@@ -690,7 +690,10 @@ def get_local_driver(
"%s" % e)
sys.argv = sys_args # Put back the original sys args
if "linux" in PLATFORM or not headless:
+ firefox_options = webdriver.FirefoxOptions()
+ firefox_options.headless = headless
firefox_driver = webdriver.Firefox(
+ firefox_options=firefox_options,
firefox_profile=profile,
capabilities=firefox_capabilities)
else:Metadata
Metadata
Assignees
Labels
bugUh oh... Something needs to be fixedUh oh... Something needs to be fixed