Closed norsemangrey closed 3 years ago
Can also be reproduced with chromedriver from homebrew ChromeDriver 86.0.4240.22 (398b0743353ff36fb1b82468f63a3a93b4e2e89e-refs/branch-heads/4240@{#378})
Apparently the modern syntax is this:
{"browserName":"chrome", "goog:chromeOptions":{"args":["--headless","--disable-gpu"]}}
And, if ran as root (e.g. in a container, or CI, then to add "--no-sandbox" to the flags.
@norsemanGrey what is the "demo applcation"? Where is its source code? Are you talking about taking https://github.com/HDE/arsenic/blob/main/docs/tutorials/helloworld.py and changing it to use chromedriver instead of geckodriver?
Re: how to pass options, refer to tests here: https://github.com/HDE/arsenic/blob/da8f80dbdda2cf68e6ccce6421d1521faac7d55c/tests/conftest.py#L47-L52
P.S. PRs are welcome! 🙏
@dimaqq yes I was referering to the https://github.com/HDE/arsenic/blob/main/docs/tutorials/helloworld.py code and switched the geckodriver with chromedriver. Sorry for not being specific.
Thanks dimaqq, based on your advice I changed my code from something like the following:
browser = browsers.Chrome(ChromeOptions={
'args': ['--headless', '--disable-gpu']
})
to look as follows:
browser = browsers.Chrome(**{"goog:chromeOptions":{
'args': ['--headless', '--disable-gpu']
}})
and the issue is resolved for me.
Nice, this is already documented in https://github.com/HDE/arsenic/blob/main/docs/reference/supported-browsers.rst
I'm getting the following error when attempting to run the Demo application with the latest chromedriver:
If omitting ChromeOptions it works, but without any capability of setting options.