As with Chrome, I want to be able to start Firefox in headless mode.
Can't find any method similar to the ChromeOptions->addArguments(); Can I use setPreference()?
// You can insert your PHP code here (or remove this block if it is not relevant for the issue).
Possible solution: Use export MOZ_HEADLESS=1 before running selenium.
Hi, I believe you can pass the settings via desired capabilities:
$capabilities = DesiredCapabilities::firefox();
$capabilities->setCapability(
'moz:firefoxOptions',
['args' => ['-headless']]
);
$driver = RemoteWebDriver::create($host, $capabilities);
@olleharstedt Could you please try this solution as well? I will add it to the wiki then.
Thanks, I'll try this.
I can confirm this works.
Thank you!
Most helpful comment
Hi, I believe you can pass the settings via desired capabilities:
@olleharstedt Could you please try this solution as well? I will add it to the wiki then.