selenium.webdriver.ie.options

Classes

ElementScrollBehavior(value)

An enumeration.

Options()

class selenium.webdriver.ie.options.ElementScrollBehavior(value)[source]

An enumeration.

TOP = 0
BOTTOM = 1
class selenium.webdriver.ie.options.Options[source]
KEY = 'se:ieOptions'
SWITCHES = 'ie.browserCommandLineSwitches'
BROWSER_ATTACH_TIMEOUT = 'browserAttachTimeout'
ELEMENT_SCROLL_BEHAVIOR = 'elementScrollBehavior'
ENSURE_CLEAN_SESSION = 'ie.ensureCleanSession'
FILE_UPLOAD_DIALOG_TIMEOUT = 'ie.fileUploadDialogTimeout'
FORCE_CREATE_PROCESS_API = 'ie.forceCreateProcessApi'
FORCE_SHELL_WINDOWS_API = 'ie.forceShellWindowsApi'
FULL_PAGE_SCREENSHOT = 'ie.enableFullPageScreenshot'
IGNORE_PROTECTED_MODE_SETTINGS = 'ignoreProtectedModeSettings'
IGNORE_ZOOM_LEVEL = 'ignoreZoomSetting'
INITIAL_BROWSER_URL = 'initialBrowserUrl'
NATIVE_EVENTS = 'nativeEvents'
PERSISTENT_HOVER = 'enablePersistentHover'
REQUIRE_WINDOW_FOCUS = 'requireWindowFocus'
USE_PER_PROCESS_PROXY = 'ie.usePerProcessProxy'
USE_LEGACY_FILE_UPLOAD_DIALOG_HANDLING = 'ie.useLegacyFileUploadDialogHandling'
ATTACH_TO_EDGE_CHROME = 'ie.edgechromium'
EDGE_EXECUTABLE_PATH = 'ie.edgepath'
IGNORE_PROCESS_MATCH = 'ie.ignoreprocessmatch'
browser_attach_timeout

Gets and Sets browser_attach_timeout

Usage

  • Get
    • self.browser_attach_timeout

  • Set
    • self.browser_attach_timeout = value

Parameters

value: int (Timeout) in milliseconds

element_scroll_behavior

Gets and Sets element_scroll_behavior

Usage

  • Get
    • self.element_scroll_behavior

  • Set
    • self.element_scroll_behavior = value

Parameters

value: int either 0 - Top, 1 - Bottom

ensure_clean_session

Gets and Sets ensure_clean_session

Usage

  • Get
    • self.ensure_clean_session

  • Set
    • self.ensure_clean_session = value

Parameters

value: bool

file_upload_dialog_timeout

Gets and Sets file_upload_dialog_timeout

Usage

  • Get
    • self.file_upload_dialog_timeout

  • Set
    • self.file_upload_dialog_timeout = value

Parameters

value: int (Timeout) in milliseconds

force_create_process_api

Gets and Sets force_create_process_api

Usage

  • Get
    • self.force_create_process_api

  • Set
    • self.force_create_process_api = value

Parameters

value: bool

force_shell_windows_api

Gets and Sets force_shell_windows_api

Usage

  • Get
    • self.force_shell_windows_api

  • Set
    • self.force_shell_windows_api = value

Parameters

value: bool

full_page_screenshot

Gets and Sets full_page_screenshot

Usage

  • Get
    • self.full_page_screenshot

  • Set
    • self.full_page_screenshot = value

Parameters

value: bool

ignore_protected_mode_settings

Gets and Sets ignore_protected_mode_settings

Usage

  • Get
    • self.ignore_protected_mode_settings

  • Set
    • self.ignore_protected_mode_settings = value

Parameters

value: bool

ignore_zoom_level

Gets and Sets ignore_zoom_level

Usage

  • Get
    • self.ignore_zoom_level

  • Set
    • self.ignore_zoom_level = value

Parameters

value: bool

initial_browser_url

Gets and Sets initial_browser_url

Usage

  • Get
    • self.initial_browser_url

  • Set
    • self.initial_browser_url = value

Parameters

value: str

native_events

Gets and Sets native_events

Usage

  • Get
    • self.native_events

  • Set
    • self.native_events = value

Parameters

value: bool

persistent_hover

Gets and Sets persistent_hover

Usage

  • Get
    • self.persistent_hover

  • Set
    • self.persistent_hover = value

Parameters

value: bool

BINARY_LOCATION_ERROR = 'Binary Location Must be a String'
add_argument(argument) None

Adds an argument to the list.

Args:
  • Sets the arguments

property arguments
Returns:

A list of arguments needed for the browser.

property capabilities
enable_mobile(android_package: str | None = None, android_activity: str | None = None, device_serial: str | None = None) None

Enables mobile browser use for browsers that support it.

Args:

android_activity: The name of the android package to start

ignore_local_proxy_environment_variables() None

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

require_window_focus

Gets and Sets require_window_focus

Usage

  • Get
    • self.require_window_focus

  • Set
    • self.require_window_focus = value

Parameters

value: bool

set_capability(name, value) None

Sets a capability.

browser_version

Gets and Sets the version of the browser.

Usage

  • Get
    • self.browser_version

  • Set
    • self.browser_version = value

Parameters

value: str

Returns

  • Get
    • str

  • Set
    • None

platform_name

Gets and Sets name of the platform.

Usage

  • Get
    • self.platform_name

  • Set
    • self.platform_name = value

Parameters

value: str

Returns

  • Get
    • str

  • Set
    • None

accept_insecure_certs

Gets and Set whether the session accepts insecure certificates.

Usage

  • Get
    • self.accept_insecure_certs

  • Set
    • self.accept_insecure_certs = value

Parameters

value: bool

Returns

  • Get
    • bool

  • Set
    • None

strict_file_interactability

Gets and Sets whether session is about file interactability.

Usage

  • Get
    • self.strict_file_interactability

  • Set
    • self.strict_file_interactability = value

Parameters

value: bool

Returns

  • Get
    • bool

  • Set
    • None

set_window_rect

Gets and Sets window size and position.

Usage

  • Get
    • self.set_window_rect

  • Set
    • self.set_window_rect = value

Parameters

value: bool

Returns

  • Get
    • bool

  • Set
    • None

enable_bidi

Gets and Set whether the session has WebDriverBiDi enabled.

Usage

  • Get
    • self.enable_bidi

  • Set
    • self.enable_bidi = value

Parameters

value: bool

Returns

  • Get
    • bool

  • Set
    • None

web_socket_url

Gets and Sets WebSocket URL.

Usage

  • Get
    • self.web_socket_url

  • Set
    • self.web_socket_url = value

Parameters

value: bool

Returns

  • Get
    • bool

  • Set
    • None

page_load_strategy

:Gets and Sets page load strategy, the default is “normal”.

Usage

  • Get
    • self.page_load_strategy

  • Set
    • self.page_load_strategy = value

Parameters

value: str

Returns

  • Get
    • str

  • Set
    • None

unhandled_prompt_behavior

:Gets and Sets unhandled prompt behavior, the default is “dismiss and notify”.

Usage

  • Get
    • self.unhandled_prompt_behavior

  • Set
    • self.unhandled_prompt_behavior = value

Parameters

value: str

Returns

  • Get
    • str

  • Set
    • None

timeouts

:Gets and Sets implicit timeout, pageLoad timeout and script timeout if set (in milliseconds)

Usage

  • Get
    • self.timeouts

  • Set
    • self.timeouts = value

Parameters

value: dict

Returns

  • Get
    • dict

  • Set
    • None

proxy

Sets and Gets Proxy.

Usage

  • Get
    • self.proxy

  • Set
    • self.proxy = value

Parameters

value: Proxy

Returns

  • Get
    • Proxy

  • Set
    • None

enable_downloads

Gets and Sets whether session can download files.

Usage

  • Get
    • self.enable_downloads

  • Set
    • self.enable_downloads = value

Parameters

value: bool

Returns

  • Get
    • bool

  • Set
    • None

use_per_process_proxy

Gets and Sets use_per_process_proxy

Usage

  • Get
    • self.use_per_process_proxy

  • Set
    • self.use_per_process_proxy = value

Parameters

value: bool

use_legacy_file_upload_dialog_handling

Gets and Sets use_legacy_file_upload_dialog_handling

Usage

  • Get
    • self.use_legacy_file_upload_dialog_handling

  • Set
    • self.use_legacy_file_upload_dialog_handling = value

Parameters

value: bool

attach_to_edge_chrome

Gets and Sets attach_to_edge_chrome

Usage

  • Get
    • self.attach_to_edge_chrome

  • Set
    • self.attach_to_edge_chrome = value

Parameters

value: bool

edge_executable_path

Gets and Sets edge_executable_path

Usage

  • Get
    • self.edge_executable_path

  • Set
    • self.edge_executable_path = value

Parameters

value: str

property options: dict
Returns:

A dictionary of browser options.

property additional_options: dict
Returns:

The additional options.

add_additional_option(name: str, value)[source]

Adds an additional option not yet added as a safe option for IE.

Args:
  • name: name of the option to add

  • value: value of the option to add

to_capabilities() dict[source]

Marshals the IE options to the correct object.

property default_capabilities: dict

Return minimal capabilities necessary as a dictionary.