selenium.webdriver.chrome.options

Classes

Options()
class selenium.webdriver.chrome.options.Options[source]
BINARY_LOCATION_ERROR = 'Binary Location Must be a String'
KEY = 'goog:chromeOptions'
add_argument(argument) → None

Adds an argument to the list.

Args:
  • Sets the arguments
add_encoded_extension(extension: str) → None

Adds Base64 encoded string with extension data to a list that will be used to extract it to the ChromeDriver.

Args:
  • extension: Base64 encoded string with extension data
add_experimental_option(name: str, value: Union[str, int, dict, List[str]]) → None

Adds an experimental option which is passed to chromium.

Args:name: The experimental option name. value: The option value.
add_extension(extension: str) → None

Adds the path to the extension to a list that will be used to extract it to the ChromeDriver.

Args:
  • extension: path to the *.crx file
arguments
Returns:A list of arguments needed for the browser.
binary_location
Returns:The location of the binary, otherwise an empty string.
capabilities
debugger_address
Returns:The address of the remote devtools instance.
default_capabilities

Return minimal capabilities necessary as a dictionary.

enable_mobile(android_package: str = 'com.android.chrome', android_activity: Optional[str] = None, device_serial: Optional[str] = None) → None[source]

Enables mobile browser use for browsers that support it.

Args:android_activity: The name of the android package to start
experimental_options
Returns:A dictionary of experimental options for chromium.
extensions
Returns:A list of encoded extensions that will be loaded.
ignore_local_proxy_environment_variables() → None

By calling this you will ignore HTTP_PROXY and HTTPS_PROXY from being picked up and used.

set_capability(name, value) → None

Sets a capability.

to_capabilities() → dict

Creates a capabilities with all the options that have been set :Returns: A dictionary with everything.