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
How do I add a custom Chrome command-line argument? #619
Comments
@mildmojo I'll create a new release of SeleniumBase with that option enabled. I don't see why it would hurt to have it on all the time. |
@mildmojo I added the Chrome option you wanted in version 1.42.9 |
Chrome options are all set here: https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/core/browser_launcher.py |
That's great! Thank you for the lightning-quick feature add! 🎉 I'll see about upgrading my project on Monday. |
One note, in the bug report I linked above, the commenter saw a performance penalty in their case. It might adversely affect non-headless users who have GPUs available? It could be worth leaving off by default, with like a |
@mildmojo Good idea. I'll create another release using |
Thank you!
…On July 10, 2020 11:20:14 PM UTC, Michael Mintz ***@***.***> wrote:
@mildmojo Good idea. I'll create another release using
``--swiftshader`` to enable it so that it's not on by default.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#619 (comment)
|
@mildmojo See https://github.com/seleniumbase/SeleniumBase/releases/tag/v1.42.10 |
💯💯💯
…On July 11, 2020 1:34:38 AM UTC, Michael Mintz ***@***.***> wrote:
@mildmojo See
https://github.com/seleniumbase/SeleniumBase/releases/tag/v1.42.10
Now, ``swiftshader`` is only enabled when specified as a command-line
option:
``--swiftshader``
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#619 (comment)
|
@mdmintz I had a chance to test this today, and it looks like Chrome treats the swiftshader software renderer as a GPU, which means the always-on I confirmed by capturing the full pytest/seleniumbase-composed Chrome command line in the Would you be willing to omit |
@mildmojo Sounds good. I'll create a new release with the update. |
@mildmojo OK, it's ready in SeleniumBase v1.42.12 |
Thanks so much, again! I'll try it out tomorrow.
|
@mdmintz AFAICT, the I also tested with dockerized Xpra and Xvfb+x11vnc+VNC setups, and while they had their own issues, Chrome rendering is fixed. Thanks again for the quick, solid help! |
I have a Python project using SeleniumBase 1.34.11 that's running inside a docker container, and I'm forwarding my pytest run to the X server on my Linux host. Unfortunately, Chrome v79 has a bug that makes it render a blank window to my host X server (nothing, no UI at all).
In the Chromium project bug report, one commenter suggests starting Chrome with
--use-gl=swiftshader
to enable software rendering. This works for me; I can rungoogle-chrome --use-gl=swiftshader
, and I get a regular Chome window with full UI.I'd like to send that argument to Chrome via SeleniumBase. I've looked through the documentation and the issues in this repo, but I don't see any mention or examples of custom Chrome options. In the codebase, I see where the browser launcher's _set_chrome_options gets a ChromeOptions object and sets arguments on it, but it seems like it only understands hardcoded arguments.
Is there a way to add a custom Chrome command-line argument?
The text was updated successfully, but these errors were encountered: