-
Hello, good day. I don't know how to add this type of options for Chrome, but using SeleniumBase. Thanks in advance for the help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The answer depends on which of the 23 SeleniumBase Syntax Formats you use. If you're running tests with You can also override If you're using the Driver() manager format, there are several method args available, such as Note that many of your options are already set by default. (Find them in seleniumbase/core/browser_launcher.py) If you try to set something twice that was already set, you may encounter issues. (This could be possible if you are setting options with |
Beta Was this translation helpful? Give feedback.
The answer depends on which of the 23 SeleniumBase Syntax Formats you use.
If you're running tests with
pytest
, there are several command-line options available: (See pytest Options).Eg. You can set the agent with
--agent=AGENT
. Start maximized with--maximize
. Add any option you want with a comma-separated list:--chromium-arg="ARG1,ARG2=SOMETHING"
.Find example tests in SeleniumBase/examples. (The
pytest
ones start withtest_
or end in_test.py
.)You can also override
browser_launcher.py
with Syntax Format 9 or 10 and useoptions.add_argument()
directly, but you will lose all the special SeleniumBase modes such as UC Mode (the most popular one). Example: test_override_driver.py.If you…