How do I set pass ChromeOptions using Driver(uc=True)? #2482
-
How do I set pass
This code is to proof that these ChromeOptions are not being passed because website is still loading images. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 18 replies
-
Options are passed directly into the For example, there's already an option to block images with
Here's a full list of options available today: Driver(
browser=None, # Choose from "chrome", "edge", "firefox", or "safari".
headless=None, # The original headless mode for Chromium and Firefox.
headless2=None, # Chromium's new headless mode. (Has more features)
headed=None, # Run tests in headed/GUI mode on Linux, where not default.
locale_code=None, # Set the Language Locale Code for the web browser.
protocol=None, # The Selenium Grid protocol: "http" or "https".
servername=None, # The Selenium Grid server/IP used for tests.
port=None, # The Selenium Grid port used by the test server.
proxy=None, # Use proxy. Format: "SERVER:PORT" or "USER:PASS@SERVER:PORT".
proxy_bypass_list=None, # Skip proxy when using the listed domains.
proxy_pac_url=None, # Use PAC file. (Format: URL or USERNAME:PASSWORD@URL)
multi_proxy=False, # Allow multiple proxies with auth when multi-threaded.
agent=None, # Modify the web browser's User-Agent string.
cap_file=None, # The desired capabilities to use with a Selenium Grid.
cap_string=None, # The desired capabilities to use with a Selenium Grid.
recorder_ext=None, # Enables the SeleniumBase Recorder Chromium extension.
disable_js=None, # Disable JavaScript on websites. Pages might break!
disable_csp=None, # Disable the Content Security Policy of websites.
enable_ws=None, # Enable Web Security on Chromium-based browsers.
disable_ws=None, # Reverse of "enable_ws". (None and False are different)
enable_sync=None, # Enable "Chrome Sync" on websites.
use_auto_ext=None, # Use Chrome's automation extension.
undetectable=None, # Use undetected-chromedriver to evade bot-detection.
uc_cdp_events=None, # Capture CDP events in undetected-chromedriver mode.
uc_subprocess=None, # Use undetected-chromedriver as a subprocess.
log_cdp_events=None, # Capture {"performance": "ALL", "browser": "ALL"}
no_sandbox=None, # (DEPRECATED) - "--no-sandbox" is always used now.
disable_gpu=None, # (DEPRECATED) - GPU is disabled if not "swiftshader".
incognito=None, # Enable Chromium's Incognito mode.
guest_mode=None, # Enable Chromium's Guest mode.
dark_mode=None, # Enable Chromium's Dark mode.
devtools=None, # Open Chromium's DevTools when the browser opens.
remote_debug=None, # Enable Chrome's Debugger on "http://localhost:9222".
enable_3d_apis=None, # Enable WebGL and 3D APIs.
swiftshader=None, # Chrome: --use-gl=angle / --use-angle=swiftshader-webgl
ad_block_on=None, # Block some types of display ads from loading.
host_resolver_rules=None, # Set host-resolver-rules, comma-separated.
block_images=None, # Block images from loading during tests.
do_not_track=None, # Tell websites that you don't want to be tracked.
chromium_arg=None, # "ARG=N,ARG2" (Set Chromium args, ","-separated.)
firefox_arg=None, # "ARG=N,ARG2" (Set Firefox args, comma-separated.)
firefox_pref=None, # SET (Set Firefox PREFERENCE:VALUE set, ","-separated)
user_data_dir=None, # Set the Chrome user data directory to use.
extension_zip=None, # Load a Chrome Extension .zip|.crx, comma-separated.
extension_dir=None, # Load a Chrome Extension directory, comma-separated.
disable_features=None, # "F1,F2" (Disable Chrome features, ","-separated.)
binary_location=None, # Set path of the Chromium browser binary to use.
driver_version=None, # Set the chromedriver or uc_driver version to use.
page_load_strategy=None, # Set Chrome PLS to "normal", "eager", or "none".
use_wire=None, # Use selenium-wire's webdriver over selenium webdriver.
external_pdf=None, # Set Chrome "plugins.always_open_pdf_externally":True.
is_mobile=None, # Use the mobile device emulator while running tests.
mobile=None, # Shortcut / Duplicate of "is_mobile".
d_width=None, # Set device width
d_height=None, # Set device height
d_p_r=None, # Set device pixel ratio
uc=None, # Shortcut / Duplicate of "undetectable".
undetected=None, # Shortcut / Duplicate of "undetectable".
uc_cdp=None, # Shortcut / Duplicate of "uc_cdp_events".
uc_sub=None, # Shortcut / Duplicate of "uc_subprocess".
log_cdp=None, # Shortcut / Duplicate of "log_cdp_events".
wire=None, # Shortcut / Duplicate of "use_wire".
pls=None, # Shortcut / Duplicate of "page_load_strategy".
) |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Hi, is there any option for multiples downloads without navigator asking? |
Beta Was this translation helpful? Give feedback.
-
Hi, how can I open as a safe browser to download any files like .xml? using from seleniumbase import Driver |
Beta Was this translation helpful? Give feedback.
-
Is there a way to disable videos when using SeleniumBase with SB in CDP mode? Something like this:
|
Beta Was this translation helpful? Give feedback.
Options are passed directly into the
Driver()
on initialization:SeleniumBase/seleniumbase/plugins/driver_manager.py
Line 65 in 77ee514
For example, there's already an option to block images with
block_images=True
:SeleniumBase/seleniumbase/core/browser_launcher.py
Line 814 in 77ee514
cap_string
is only for Selenium Grid use with compatible grids. And the Selenium Grid isn't compatible with UC Mode, which means you can't usecap_string
with UC Mode either.Here's a full list of options available today: