ChromeOptions
- class selenium_driverless.types.options.Options[source]
- add_argument(argument)[source]
Adds an argument for launching chrome
- Parameters:
argument (
str
) – argument to add
- add_experimental_option(name, value)[source]
Adds an experimental option which is passed to chromium.
Warning
only
name="prefs"
supported. This method is deprecated and will be removed. UseChromeOptions.update_pref
instead.- Parameters:
name (
str
) – The experimental option name.value (
Union
[str
,int
,dict
,List
[str
]]) – The option value.
- Return type:
None
- add_extension(path)[source]
Adds an extension to Chrome The extension can either be a compressed file (zip, crx, etc.) or extracted in a directory
- Parameters:
path (
str
) – path to the extension- Return type:
None
- property arguments: List[str]
used arguments for the chrome executable
- property auto_clean_dirs: bool
if user-data-dir should be cleaned automatically defaults to True
- property binary_location: str
path to the Chromium binary
- property debugger_address: str
The address of the remote devtools instance Setting this value makes the driver connect to a remote browser instance.
- property headless: bool
Whether chrome starts headless. defaults to
False
- property single_proxy
Set a single proxy to be applied.
options = webdriver.ChromeOptions() options.single_proxy = "http://user1:passwrd1@example.proxy.com:5001/"
Warning
Only supported when Chrome has been started with driverless or the extension at
selenium_driverless/files/mv3_extension
has been loaded into the browser.Socks5
doesn’t support authentication due to crbug#1309413.
- property startup_url: str
the url the first tab loads. Defaults to
about:blank
- property user_data_dir: str
the directory to save all browser data in.
None
(default) will temporarily create a directory in $temp