--chromium-arg="ARG=N,ARG2" function #2236
-
Hi, I have been having trouble with using this function of the bot. Does anyone mind showing me how to use it when it is 1 argument, 2 arguments, and so on. For example, one arg I want to use is "--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 Edg/118.0.2088.76"(I know the bot has an agent switcher function, but I am just giving an example. Let's say I also want to use "--disable-popup-blocking", how do I go about it? Thank you so much in advanced! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
For args that aren't already covered by existing seleniumbase options, use |
Beta Was this translation helpful? Give feedback.
pytest --agent=AGENT
already sets the user agent string. (With some formats it would be agent=AGENT.) But if you're using UC Mode, you shouldn't mess with that value, as it already gets set to the value it needs to be for the browser to remain undetected.--disable-popup-blocking
is already set in UC Mode, so don't set it twice:SeleniumBase/seleniumbase/core/browser_launcher.py
Line 1076 in 466f8d4
For args that aren't already covered by existing seleniumbase options, use
--chromium-arg=ARG1,ARG2=VALUE
, eg:pytest --chromium-arg="--enable-sync,--use-gl=angle"
, for example. (Comma-separated options)