Skip to content

Chrome Options in SeleniumBase #2346

Answered by mdmintz
joako233 asked this question in Q&A

You must be logged in to vote

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 with test_ or end in _test.py.)

You can also override browser_launcher.py with Syntax Format 9 or 10 and use options.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…

Replies: 1 comment

You must be logged in to vote
0 replies
Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants