From ee486d9192f1f3bcecaa397d2759321409ff4cd4 Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Thu, 20 Mar 2025 16:47:12 -0400 Subject: [PATCH 1/7] [py] Fix docs nits --- py/docs/source/index.rst | 2 +- py/selenium/webdriver/remote/webdriver.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/py/docs/source/index.rst b/py/docs/source/index.rst index 4d81155e043e8..e29e108349845 100644 --- a/py/docs/source/index.rst +++ b/py/docs/source/index.rst @@ -14,7 +14,7 @@ The `selenium` package is used to automate web browser interaction from Python. +-----------------+--------------------------------------------------------------------------------------+ | **GitHub**: | https://github.com/SeleniumHQ/Selenium | +-----------------+--------------------------------------------------------------------------------------+ -| **PyPI**: | https://pypi.org/project/selenium | +| **PyPI**: | https://pypi.org/project/selenium | +-----------------+--------------------------------------------------------------------------------------+ | **API Docs**: | https://selenium.dev/selenium/docs/api/py/api.html | +-----------------+--------------------------------------------------------------------------------------+ diff --git a/py/selenium/webdriver/remote/webdriver.py b/py/selenium/webdriver/remote/webdriver.py index f783623b2d125..40f4c4335cd58 100644 --- a/py/selenium/webdriver/remote/webdriver.py +++ b/py/selenium/webdriver/remote/webdriver.py @@ -799,7 +799,7 @@ def set_script_timeout(self, time_to_wait: float) -> None: execute_async_script call before throwing an error. Parameters: - --------- + ---------- time_to_wait : float - The amount of time to wait (in seconds) @@ -814,13 +814,13 @@ def set_page_load_timeout(self, time_to_wait: float) -> None: throwing an error. Parameters: - --------- - time_to_wait : float + ---------- + time_to_wait : float - The amount of time to wait (in seconds) - Example: - -------- - >>> driver.set_page_load_timeout(30) + Example: + ------- + >>> driver.set_page_load_timeout(30) """ try: self.execute(Command.SET_TIMEOUTS, {"pageLoad": int(float(time_to_wait) * 1000)}) From 94a5d879af50235cb4a75ee23397332bb3676796 Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Thu, 20 Mar 2025 17:06:44 -0400 Subject: [PATCH 2/7] [py] Fix doc nits --- py/selenium/webdriver/safari/options.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/py/selenium/webdriver/safari/options.py b/py/selenium/webdriver/safari/options.py index 74b39609d6cda..f25535cead3fe 100644 --- a/py/selenium/webdriver/safari/options.py +++ b/py/selenium/webdriver/safari/options.py @@ -70,43 +70,43 @@ class Options(ArgOptions): automatic_inspection = _SafariOptionsDescriptor(AUTOMATIC_INSPECTION, bool) """Get or Set Automatic Inspection value: - Usage - ----- + Usage: + ------ - Get - `self.automatic_inspection` - Set - `self.automatic_inspection` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` """ automatic_profiling = _SafariOptionsDescriptor(AUTOMATIC_PROFILING, bool) """Get or Set Automatic Profiling value: - Usage - ----- + Usage: + ------ - Get - `self.automatic_profiling` - Set - `self.automatic_profiling` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` """ use_technology_preview = _SafariOptionsDescriptor(SAFARI_TECH_PREVIEW, bool) """Get and Set Technology Preview: - Usage - ----- + Usage: + ------ - Get - `self.use_technology_preview` - Set - `self.use_technology_preview` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` """ From b5b4e0140e8340f49d9ed12bbd09d2a99ccc1ec4 Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Thu, 20 Mar 2025 17:38:35 -0400 Subject: [PATCH 3/7] [py] Fix docstring errors that sphinx complained about --- .../common/actions/action_builder.py | 10 +- py/selenium/webdriver/common/by.py | 2 +- py/selenium/webdriver/common/options.py | 156 +++++++++--------- .../webdriver/common/print_page_options.py | 136 +++++++-------- py/selenium/webdriver/common/proxy.py | 80 ++++----- py/selenium/webdriver/common/timeouts.py | 20 +-- py/selenium/webdriver/ie/options.py | 136 +++++++-------- py/selenium/webdriver/remote/shadowroot.py | 4 +- py/selenium/webdriver/remote/webdriver.py | 50 +++--- py/selenium/webdriver/remote/webelement.py | 18 +- .../webdriver/support/expected_conditions.py | 62 +++---- .../webdriver/support/relative_locator.py | 16 +- py/selenium/webdriver/support/wait.py | 6 +- 13 files changed, 348 insertions(+), 348 deletions(-) diff --git a/py/selenium/webdriver/common/actions/action_builder.py b/py/selenium/webdriver/common/actions/action_builder.py index cc6e23a1925cd..f959fbff6fd10 100644 --- a/py/selenium/webdriver/common/actions/action_builder.py +++ b/py/selenium/webdriver/common/actions/action_builder.py @@ -52,7 +52,7 @@ def get_device_with(self, name: str) -> Optional[Union["WheelInput", "PointerInp """Get the device with the given name. Parameters: - ---------- + ----------- name : str The name of the device to get. @@ -86,7 +86,7 @@ def add_key_input(self, name: str) -> KeyInput: """Add a new key input device to the action builder. Parameters: - ---------- + ----------- name : str The name of the key input device. @@ -107,7 +107,7 @@ def add_pointer_input(self, kind: str, name: str) -> PointerInput: """Add a new pointer input device to the action builder. Parameters: - ---------- + ----------- kind : str The kind of pointer input device. - "mouse" @@ -134,7 +134,7 @@ def add_wheel_input(self, name: str) -> WheelInput: """Add a new wheel input device to the action builder. Parameters: - ---------- + ----------- name : str The name of the wheel input device. @@ -186,7 +186,7 @@ def _add_input(self, new_input: Union[KeyInput, PointerInput, WheelInput]) -> No """Add a new input device to the action builder. Parameters: - ---------- + ----------- new_input : Union[KeyInput, PointerInput, WheelInput] The new input device to add. """ diff --git a/py/selenium/webdriver/common/by.py b/py/selenium/webdriver/common/by.py index cf4a3a220eb46..dab351ff55dd2 100644 --- a/py/selenium/webdriver/common/by.py +++ b/py/selenium/webdriver/common/by.py @@ -63,7 +63,7 @@ class By: >>> element = driver.find_element(By.TAG_NAME, 'div') CLASS_NAME: - ---------- + ----------- Select the element by its class name. >>> element = driver.find_element(By.CLASS_NAME, 'myElement') diff --git a/py/selenium/webdriver/common/options.py b/py/selenium/webdriver/common/options.py index 9d838a09c0fc2..20d07021efbdf 100644 --- a/py/selenium/webdriver/common/options.py +++ b/py/selenium/webdriver/common/options.py @@ -155,19 +155,19 @@ class BaseOptions(metaclass=ABCMeta): browser_version = _BaseOptionsDescriptor("browserVersion") """Gets and Sets the version of the browser. - Usage - ----- + Usage: + ------ - Get - `self.browser_version` - Set - `self.browser_version` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `str` - Returns - ------- + Returns: + -------- - Get - `str` - Set @@ -177,19 +177,19 @@ class BaseOptions(metaclass=ABCMeta): platform_name = _BaseOptionsDescriptor("platformName") """Gets and Sets name of the platform. - Usage - ----- + Usage: + ------ - Get - `self.platform_name` - Set - `self.platform_name` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `str` - Returns - ------- + Returns: + -------- - Get - `str` - Set @@ -199,19 +199,19 @@ class BaseOptions(metaclass=ABCMeta): accept_insecure_certs = _BaseOptionsDescriptor("acceptInsecureCerts") """Gets and Set whether the session accepts insecure certificates. - Usage - ----- + Usage: + ------ - Get - `self.accept_insecure_certs` - Set - `self.accept_insecure_certs` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` - Returns - ------- + Returns: + -------- - Get - `bool` - Set @@ -221,19 +221,19 @@ class BaseOptions(metaclass=ABCMeta): strict_file_interactability = _BaseOptionsDescriptor("strictFileInteractability") """Gets and Sets whether session is about file interactability. - Usage - ----- + Usage: + ------ - Get - `self.strict_file_interactability` - Set - `self.strict_file_interactability` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` - Returns - ------- + Returns: + -------- - Get - `bool` - Set @@ -243,19 +243,19 @@ class BaseOptions(metaclass=ABCMeta): set_window_rect = _BaseOptionsDescriptor("setWindowRect") """Gets and Sets window size and position. - Usage - ----- + Usage: + ------ - Get - `self.set_window_rect` - Set - `self.set_window_rect` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` - Returns - ------- + Returns: + -------- - Get - `bool` - Set @@ -265,19 +265,19 @@ class BaseOptions(metaclass=ABCMeta): enable_bidi = _BaseOptionsDescriptor("enableBidi") """Gets and Set whether the session has WebDriverBiDi enabled. - Usage - ----- + Usage: + ------ - Get - `self.enable_bidi` - Set - `self.enable_bidi` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` - Returns - ------- + Returns: + -------- - Get - `bool` - Set @@ -287,19 +287,19 @@ class BaseOptions(metaclass=ABCMeta): web_socket_url = _BaseOptionsDescriptor("webSocketUrl") """Gets and Set whether the session accepts insecure certificates. - Usage - ----- + Usage: + ------ - Get - `self.web_socket_url` - Set - `self.web_socket_url` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `str` - Returns - ------- + Returns: + -------- - Get - `str` or `None` - Set @@ -309,19 +309,19 @@ class BaseOptions(metaclass=ABCMeta): page_load_strategy = _PageLoadStrategyDescriptor("pageLoadStrategy") """:Gets and Sets page load strategy, the default is "normal". - Usage - ----- + Usage: + ------ - Get - `self.page_load_strategy` - Set - `self.page_load_strategy` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `str` - Returns - ------- + Returns: + -------- - Get - `str` - Set @@ -332,19 +332,19 @@ class BaseOptions(metaclass=ABCMeta): """:Gets and Sets unhandled prompt behavior, the default is "dismiss and notify". - Usage - ----- + Usage: + ------ - Get - `self.unhandled_prompt_behavior` - Set - `self.unhandled_prompt_behavior` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `str` - Returns - ------- + Returns: + -------- - Get - `str` - Set @@ -355,19 +355,19 @@ class BaseOptions(metaclass=ABCMeta): """:Gets and Sets implicit timeout, pageLoad timeout and script timeout if set (in milliseconds) - Usage - ----- + Usage: + ------ - Get - `self.timeouts` - Set - `self.timeouts` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `dict` - Returns - ------- + Returns: + -------- - Get - `dict` - Set @@ -377,19 +377,19 @@ class BaseOptions(metaclass=ABCMeta): proxy = _ProxyDescriptor("proxy") """Sets and Gets Proxy. - Usage - ----- + Usage: + ------ - Get - `self.proxy` - Set - `self.proxy` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `Proxy` - Returns - ------- + Returns: + -------- - Get - `Proxy` - Set @@ -399,19 +399,19 @@ class BaseOptions(metaclass=ABCMeta): enable_downloads = _BaseOptionsDescriptor("se:downloadsEnabled") """Gets and Sets whether session can download files. - Usage - ----- + Usage: + ------ - Get - `self.enable_downloads` - Set - `self.enable_downloads` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` - Returns - ------- + Returns: + -------- - Get - `bool` - Set @@ -421,19 +421,19 @@ class BaseOptions(metaclass=ABCMeta): web_socket_url = _BaseOptionsDescriptor("webSocketUrl") """Gets and Sets WebSocket URL. - Usage - ----- + Usage: + ------ - Get - `self.web_socket_url` - Set - `self.web_socket_url` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` - Returns - ------- + Returns: + -------- - Get - `bool` - Set diff --git a/py/selenium/webdriver/common/print_page_options.py b/py/selenium/webdriver/common/print_page_options.py index b6c3941826c6f..6a532aae78ae3 100644 --- a/py/selenium/webdriver/common/print_page_options.py +++ b/py/selenium/webdriver/common/print_page_options.py @@ -171,12 +171,12 @@ class PrintOptions: - Set - `self.page_height` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `float` - Returns - ------- + Returns: + -------- - Get - `Optional[float]` - Set @@ -186,19 +186,19 @@ class PrintOptions: page_width = _PageSettingsDescriptor("width") """Gets and Sets page_width: - Usage - ----- + Usage: + ------ - Get - `self.page_width` - Set - `self.page_width` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `float` - Returns - ------- + Returns: + -------- - Get - `Optional[float]` - Set @@ -208,19 +208,19 @@ class PrintOptions: margin_top = _MarginSettingsDescriptor("top") """Gets and Sets margin_top: - Usage - ----- + Usage: + ------ - Get - `self.margin_top` - Set - `self.margin_top` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `float` - Returns - ------- + Returns: + -------- - Get - `Optional[float]` - Set @@ -230,19 +230,19 @@ class PrintOptions: margin_bottom = _MarginSettingsDescriptor("bottom") """Gets and Sets margin_bottom: - Usage - ----- + Usage: + ------ - Get - `self.margin_bottom` - Set - `self.margin_bottom` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `float` - Returns - ------- + Returns: + -------- - Get - `Optional[float]` - Set @@ -252,19 +252,19 @@ class PrintOptions: margin_left = _MarginSettingsDescriptor("left") """Gets and Sets margin_left: - Usage - ----- + Usage: + ------ - Get - `self.margin_left` - Set - `self.margin_left` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `float` - Returns - ------- + Returns: + -------- - Get - `Optional[float]` - Set @@ -274,19 +274,19 @@ class PrintOptions: margin_right = _MarginSettingsDescriptor("right") """Gets and Sets margin_right: - Usage - ----- + Usage: + ------ - Get - `self.margin_right` - Set - `self.margin_right` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `float` - Returns - ------- + Returns: + -------- - Get - `Optional[float]` - Set @@ -296,19 +296,19 @@ class PrintOptions: scale = _ScaleDescriptor("scale") """Gets and Sets scale: - Usage - ----- + Usage: + ------ - Get - `self.scale` - Set - `self.scale` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `float` - Returns - ------- + Returns: + -------- - Get - `Optional[float]` - Set @@ -318,19 +318,19 @@ class PrintOptions: orientation = _PageOrientationDescriptor("orientation") """Gets and Sets orientation: - Usage - ----- + Usage: + ------ - Get - `self.orientation` - Set - `self.orientation` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `Orientation` - Returns - ------- + Returns: + -------- - Get - `Optional[Orientation]` - Set @@ -340,19 +340,19 @@ class PrintOptions: background = _ValidateBackGround("background") """Gets and Sets background: - Usage - ----- + Usage: + ------ - Get - `self.background` - Set - `self.background` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` - Returns - ------- + Returns: + -------- - Get - `Optional[bool]` - Set @@ -362,19 +362,19 @@ class PrintOptions: shrink_to_fit = _ValidateShrinkToFit("shrinkToFit") """Gets and Sets shrink_to_fit: - Usage - ----- + Usage: + ------ - Get - `self.shrink_to_fit` - Set - `self.shrink_to_fit` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` - Returns - ------- + Returns: + -------- - Get - `Optional[bool]` - Set @@ -384,19 +384,19 @@ class PrintOptions: page_ranges = _ValidatePageRanges("pageRanges") """Gets and Sets page_ranges: - Usage - ----- + Usage: + ------ - Get - `self.page_ranges` - Set - `self.page_ranges` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: ` List[str]` - Returns - ------- + Returns: + -------- - Get - `Optional[List[str]]` - Set @@ -423,13 +423,13 @@ def to_dict(self) -> _PrintOpts: def set_page_size(self, page_size: dict) -> None: """Sets the page size to predefined or custom dimensions. - Parameters - ---------- + Parameters: + ----------- page_size: dict A dictionary containing `height` and `width` as keys with respective values. - Example - ------- + Example: + -------- self.set_page_size(PageSize.A4) # A4 predefined size self.set_page_size({"height": 15.0, "width": 20.0}) # Custom size in cm """ diff --git a/py/selenium/webdriver/common/proxy.py b/py/selenium/webdriver/common/proxy.py index 145b5fb9548c9..328a3a46ce464 100644 --- a/py/selenium/webdriver/common/proxy.py +++ b/py/selenium/webdriver/common/proxy.py @@ -88,150 +88,150 @@ class Proxy: auto_detect = _ProxyTypeDescriptor("autodetect", ProxyType.AUTODETECT) """Gets and Sets `auto_detect` - Usage - ----- + Usage: + ------ - Get - `self.auto_detect` - Set - `self.auto_detect` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `str` """ ftp_proxy = _ProxyTypeDescriptor("ftpProxy", ProxyType.MANUAL) """Gets and Sets `ftp_proxy` - Usage - ----- + Usage: + ------ - Get - `self.ftp_proxy` - Set - `self.ftp_proxy` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `str` """ http_proxy = _ProxyTypeDescriptor("httpProxy", ProxyType.MANUAL) """Gets and Sets `http_proxy` - Usage - ----- + Usage: + ------ - Get - `self.http_proxy` - Set - `self.http_proxy` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `str` """ no_proxy = _ProxyTypeDescriptor("noProxy", ProxyType.MANUAL) """Gets and Sets `no_proxy` - Usage - ----- + Usage: + ------ - Get - `self.no_proxy` - Set - `self.no_proxy` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `str` """ proxy_autoconfig_url = _ProxyTypeDescriptor("proxyAutoconfigUrl", ProxyType.PAC) """Gets and Sets `proxy_autoconfig_url` - Usage - ----- + Usage: + ------ - Get - `self.proxy_autoconfig_url` - Set - `self.proxy_autoconfig_url` = `value` - Parameter - --------- + Parameters: + ----------- `value`: `str` """ ssl_proxy = _ProxyTypeDescriptor("sslProxy", ProxyType.MANUAL) """Gets and Sets `ssl_proxy` - Usage - ----- + Usage: + ------ - Get - `self.ssl_proxy` - Set - `self.ssl_proxy` = `value` - Parameter - --------- + Parameters: + ----------- `value`: `str` """ socks_proxy = _ProxyTypeDescriptor("socksProxy", ProxyType.MANUAL) """Gets and Sets `socks_proxy` - Usage - ----- + Usage: + ------ - Get - `self.sock_proxy` - Set - `self.socks_proxy` = `value` - Parameter - --------- + Parameters: + ----------- `value`: `str` """ socks_username = _ProxyTypeDescriptor("socksUsername", ProxyType.MANUAL) """Gets and Sets `socks_password` - Usage - ----- + Usage: + ------ - Get - `self.socks_password` - Set - `self.socks_password` = `value` - Parameter - --------- + Parameters: + ----------- `value`: `str` """ socks_password = _ProxyTypeDescriptor("socksPassword", ProxyType.MANUAL) """Gets and Sets `socks_password` - Usage - ----- + Usage: + ------ - Get - `self.socks_password` - Set - `self.socks_password` = `value` - Parameter - --------- + Parameters: + ----------- `value`: `str` """ socks_version = _ProxyTypeDescriptor("socksVersion", ProxyType.MANUAL) """Gets and Sets `socks_version` - Usage - ----- + Usage: + ------ - Get - `self.socks_version` - Set - `self.socks_version` = `value` - Parameter - --------- + Parameters: + ----------- `value`: `str` """ diff --git a/py/selenium/webdriver/common/timeouts.py b/py/selenium/webdriver/common/timeouts.py index adaa9507bef08..baf6f4b5bc3b4 100644 --- a/py/selenium/webdriver/common/timeouts.py +++ b/py/selenium/webdriver/common/timeouts.py @@ -78,15 +78,15 @@ def __init__(self, implicit_wait: float = 0, page_load: float = 0, script: float This does not set the value on the remote end. - Usage - ----- + Usage: + ------ - Get - `self.implicit_wait` - Set - `self.implicit_wait` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `float` """ @@ -95,15 +95,15 @@ def __init__(self, implicit_wait: float = 0, page_load: float = 0, script: float This does not set the value on the remote end. - Usage - ----- + Usage: + ------ - Get - `self.page_load` - Set - `self.page_load` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `float` """ @@ -113,14 +113,14 @@ def __init__(self, implicit_wait: float = 0, page_load: float = 0, script: float This does not set the value on the remote end. - Usage + Usage: ------ - Get - `self.script` - Set - `self.script` = `value` - Parameters + Parameters: ----------- `value`: `float` """ diff --git a/py/selenium/webdriver/ie/options.py b/py/selenium/webdriver/ie/options.py index e6aec18b63ab8..3e4dcbed9b4f3 100644 --- a/py/selenium/webdriver/ie/options.py +++ b/py/selenium/webdriver/ie/options.py @@ -110,255 +110,255 @@ class Options(ArgOptions): browser_attach_timeout = _IeOptionsDescriptor(BROWSER_ATTACH_TIMEOUT, int) """Gets and Sets `browser_attach_timeout` - Usage - ----- + Usage: + ------ - Get - `self.browser_attach_timeout` - Set - `self.browser_attach_timeout` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `int` (Timeout) in milliseconds """ element_scroll_behavior = _IeOptionsDescriptor(ELEMENT_SCROLL_BEHAVIOR, Enum) """Gets and Sets `element_scroll_behavior` - Usage - ----- + Usage: + ------ - Get - `self.element_scroll_behavior` - Set - `self.element_scroll_behavior` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `int` either 0 - Top, 1 - Bottom """ ensure_clean_session = _IeOptionsDescriptor(ENSURE_CLEAN_SESSION, bool) """Gets and Sets `ensure_clean_session` - Usage - ----- + Usage: + ------ - Get - `self.ensure_clean_session` - Set - `self.ensure_clean_session` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` """ file_upload_dialog_timeout = _IeOptionsDescriptor(FILE_UPLOAD_DIALOG_TIMEOUT, int) """Gets and Sets `file_upload_dialog_timeout` - Usage - ----- + Usage: + ------ - Get - `self.file_upload_dialog_timeout` - Set - `self.file_upload_dialog_timeout` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `int` (Timeout) in milliseconds """ force_create_process_api = _IeOptionsDescriptor(FORCE_CREATE_PROCESS_API, bool) """Gets and Sets `force_create_process_api` - Usage - ----- + Usage: + ------ - Get - `self.force_create_process_api` - Set - `self.force_create_process_api` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` """ force_shell_windows_api = _IeOptionsDescriptor(FORCE_SHELL_WINDOWS_API, bool) """Gets and Sets `force_shell_windows_api` - Usage - ----- + Usage: + ------ - Get - `self.force_shell_windows_api` - Set - `self.force_shell_windows_api` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` """ full_page_screenshot = _IeOptionsDescriptor(FULL_PAGE_SCREENSHOT, bool) """Gets and Sets `full_page_screenshot` - Usage - ----- + Usage: + ------ - Get - `self.full_page_screenshot` - Set - `self.full_page_screenshot` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` """ ignore_protected_mode_settings = _IeOptionsDescriptor(IGNORE_PROTECTED_MODE_SETTINGS, bool) """Gets and Sets `ignore_protected_mode_settings` - Usage - ----- + Usage: + ------ - Get - `self.ignore_protected_mode_settings` - Set - `self.ignore_protected_mode_settings` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` """ ignore_zoom_level = _IeOptionsDescriptor(IGNORE_ZOOM_LEVEL, bool) """Gets and Sets `ignore_zoom_level` - Usage - ----- + Usage: + ------ - Get - `self.ignore_zoom_level` - Set - `self.ignore_zoom_level` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` """ initial_browser_url = _IeOptionsDescriptor(INITIAL_BROWSER_URL, str) """Gets and Sets `initial_browser_url` - Usage - ----- + Usage: + ------ - Get - `self.initial_browser_url` - Set - `self.initial_browser_url` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `str` """ native_events = _IeOptionsDescriptor(NATIVE_EVENTS, bool) """Gets and Sets `native_events` - Usage - ----- + Usage: + ------ - Get - `self.native_events` - Set - `self.native_events` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` """ persistent_hover = _IeOptionsDescriptor(PERSISTENT_HOVER, bool) """Gets and Sets `persistent_hover` - Usage - ----- + Usage: + ------ - Get - `self.persistent_hover` - Set - `self.persistent_hover` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` """ require_window_focus = _IeOptionsDescriptor(REQUIRE_WINDOW_FOCUS, bool) """Gets and Sets `require_window_focus` - Usage - ----- + Usage: + ------ - Get - `self.require_window_focus` - Set - `self.require_window_focus` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` """ use_per_process_proxy = _IeOptionsDescriptor(USE_PER_PROCESS_PROXY, bool) """Gets and Sets `use_per_process_proxy` - Usage - ----- + Usage: + ------ - Get - `self.use_per_process_proxy` - Set - `self.use_per_process_proxy` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` """ use_legacy_file_upload_dialog_handling = _IeOptionsDescriptor(USE_LEGACY_FILE_UPLOAD_DIALOG_HANDLING, bool) """Gets and Sets `use_legacy_file_upload_dialog_handling` - Usage - ----- + Usage: + ------ - Get - `self.use_legacy_file_upload_dialog_handling` - Set - `self.use_legacy_file_upload_dialog_handling` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` """ attach_to_edge_chrome = _IeOptionsDescriptor(ATTACH_TO_EDGE_CHROME, bool) """Gets and Sets `attach_to_edge_chrome` - Usage - ----- + Usage: + ------ - Get - `self.attach_to_edge_chrome` - Set - `self.attach_to_edge_chrome` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `bool` """ edge_executable_path = _IeOptionsDescriptor(EDGE_EXECUTABLE_PATH, str) """Gets and Sets `edge_executable_path` - Usage - ----- + Usage: + ------ - Get - `self.edge_executable_path` - Set - `self.edge_executable_path` = `value` - Parameters - ---------- + Parameters: + ----------- `value`: `str` """ diff --git a/py/selenium/webdriver/remote/shadowroot.py b/py/selenium/webdriver/remote/shadowroot.py index faeef52dc42ac..fc78413186870 100644 --- a/py/selenium/webdriver/remote/shadowroot.py +++ b/py/selenium/webdriver/remote/shadowroot.py @@ -44,7 +44,7 @@ def find_element(self, by: str = By.ID, value: str = None): locator. Parameters: - ---------- + ----------- by : selenium.webdriver.common.by.By The locating strategy to use. Default is `By.ID`. Supported values include: - By.ID: Locate by element ID. @@ -82,7 +82,7 @@ def find_elements(self, by: str = By.ID, value: str = None): """Find elements inside a shadow root given a By strategy and locator. Parameters: - ---------- + ----------- by : selenium.webdriver.common.by.By The locating strategy to use. Default is `By.ID`. Supported values include: - By.ID: Locate by element ID. diff --git a/py/selenium/webdriver/remote/webdriver.py b/py/selenium/webdriver/remote/webdriver.py index 40f4c4335cd58..21db7809f4a39 100644 --- a/py/selenium/webdriver/remote/webdriver.py +++ b/py/selenium/webdriver/remote/webdriver.py @@ -91,7 +91,7 @@ def _create_caps(caps): options object. Parameters: - ---------- + ----------- caps : dict - A dictionary of capabilities requested by the caller. """ @@ -177,7 +177,7 @@ class WebDriver(BaseWebDriver): https://www.selenium.dev/documentation/legacy/json_wire_protocol/. Attributes: - ---------- + ----------- session_id - String ID of the browser session started and controlled by this WebDriver. capabilities - Dictionary of effective capabilities of this browser session as returned by the remote server. See https://www.selenium.dev/documentation/legacy/desired_capabilities/ @@ -202,7 +202,7 @@ def __init__( protocol. Parameters: - ---------- + ----------- command_executor : str or remote_connection.RemoteConnection - Either a string representing the URL of the remote server or a custom remote_connection.RemoteConnection object. Defaults to 'http://127.0.0.1:4444/wd/hub'. @@ -273,7 +273,7 @@ def file_detector_context(self, file_detector_class, *args, **kwargs): context. Ensures the original file detector is set afterwards. Parameters: - ---------- + ----------- file_detector_class : object - Class of the desired file detector. If the class is different from the current file_detector, then the class is instantiated with args and kwargs @@ -333,7 +333,7 @@ def start_session(self, capabilities: dict) -> None: """Creates a new session with the desired capabilities. Parameters: - ---------- + ----------- capabilities : dict - A capabilities dict to start the session with. """ @@ -381,7 +381,7 @@ def execute_cdp_cmd(self, cmd: str, cmd_args: dict): https://chromedevtools.github.io/devtools-protocol/ Parameters: - ---------- + ----------- cmd : str, - Command name @@ -405,7 +405,7 @@ def execute(self, driver_command: str, params: dict = None) -> dict: """Sends a command to be executed by a command.CommandExecutor. Parameters: - ---------- + ----------- driver_command : str - The name of the command to execute as a string. @@ -441,7 +441,7 @@ def get(self, url: str) -> None: onload event has fired). Parameters: - ---------- + ----------- url : str - The URL to be opened by the browser. - Must include the protocol (e.g., http://, https://). @@ -501,7 +501,7 @@ def execute_script(self, script, *args): """Synchronously Executes JavaScript in the current window/frame. Parameters: - ---------- + ----------- script : str - The javascript to execute. @@ -531,7 +531,7 @@ def execute_async_script(self, script: str, *args): """Asynchronously Executes JavaScript in the current window/frame. Parameters: - ---------- + ----------- script : str - The javascript to execute. @@ -758,7 +758,7 @@ def add_cookie(self, cookie_dict) -> None: """Adds a cookie to your current session. Parameters: - ---------- + ----------- cookie_dict : dict - A dictionary object, with required keys - "name" and "value"; - Optional keys - "path", "domain", "secure", "httpOnly", "expiry", "sameSite" @@ -784,7 +784,7 @@ def implicitly_wait(self, time_to_wait: float) -> None: set_script_timeout. Parameters: - ---------- + ----------- time_to_wait : float - Amount of time to wait (in seconds) @@ -799,7 +799,7 @@ def set_script_timeout(self, time_to_wait: float) -> None: execute_async_script call before throwing an error. Parameters: - ---------- + ----------- time_to_wait : float - The amount of time to wait (in seconds) @@ -814,7 +814,7 @@ def set_page_load_timeout(self, time_to_wait: float) -> None: throwing an error. Parameters: - ---------- + ----------- time_to_wait : float - The amount of time to wait (in seconds) @@ -865,7 +865,7 @@ def find_element(self, by=By.ID, value: Optional[str] = None) -> WebElement: """Find an element given a By strategy and locator. Parameters: - ---------- + ----------- by : selenium.webdriver.common.by.By The locating strategy to use. Default is `By.ID`. Supported values include: - By.ID: Locate by element ID. @@ -901,7 +901,7 @@ def find_elements(self, by=By.ID, value: Optional[str] = None) -> List[WebElemen """Find elements given a By strategy and locator. Parameters: - ---------- + ----------- by : selenium.webdriver.common.by.By The locating strategy to use. Default is `By.ID`. Supported values include: - By.ID: Locate by element ID. @@ -951,7 +951,7 @@ def get_screenshot_as_file(self, filename) -> bool: paths in your filename. Parameters: - ---------- + ----------- filename : str - The full path you wish to save your screenshot to. This - should end with a `.png` extension. @@ -982,7 +982,7 @@ def save_screenshot(self, filename) -> bool: paths in your filename. Parameters: - ---------- + ----------- filename : str - The full path you wish to save your screenshot to. This - should end with a `.png` extension. @@ -1016,7 +1016,7 @@ def set_window_size(self, width, height, windowHandle: str = "current") -> None: """Sets the width and height of the current window. (window.resizeTo) Parameters: - ---------- + ----------- width : int - the width in pixels to set the window to @@ -1124,7 +1124,7 @@ def file_detector(self, detector) -> None: - see UselessFileDetector Parameters: - ---------- + ----------- detector : Any - The detector to use. Must not be None. """ @@ -1149,7 +1149,7 @@ def orientation(self, value) -> None: """Sets the current orientation of the device. Parameters: - ---------- + ----------- value : str - orientation to set it to. @@ -1178,7 +1178,7 @@ def get_log(self, log_type): """Gets the log for a given log type. Parameters: - ---------- + ----------- log_type : str - Type of log that which will be returned @@ -1372,7 +1372,7 @@ def set_user_verified(self, verified: bool) -> None: verification. Parameters: - ---------- + ----------- verified: True if the authenticator will pass user verification, False otherwise. Example: @@ -1398,7 +1398,7 @@ def download_file(self, file_name: str, target_directory: str) -> None: directory. Parameters: - ---------- + ----------- file_name : str - The name of the file to download. @@ -1494,7 +1494,7 @@ def fedcm_dialog(self, timeout=5, poll_frequency=0.5, ignored_exceptions=None): """Waits for and returns the FedCM dialog. Parameters: - ---------- + ----------- timeout : int - How long to wait for the dialog diff --git a/py/selenium/webdriver/remote/webelement.py b/py/selenium/webdriver/remote/webelement.py index 56ed7a9435303..bcde3ece83a67 100644 --- a/py/selenium/webdriver/remote/webelement.py +++ b/py/selenium/webdriver/remote/webelement.py @@ -157,7 +157,7 @@ def get_property(self, name) -> str | bool | WebElement | dict: """Gets the given property of the element. Parameters: - ---------- + ----------- name : str - Name of the property to retrieve. @@ -181,7 +181,7 @@ def get_dom_attribute(self, name) -> str: method only returns attributes declared in the element's HTML markup. Parameters: - ---------- + ----------- name : str - Name of the attribute to retrieve. @@ -213,7 +213,7 @@ def get_attribute(self, name) -> str | None: :func:`~selenium.webdriver.remote.BaseWebElement.get_property` methods respectively. Parameters: - ---------- + ----------- name : str - Name of the attribute/property to retrieve. @@ -260,7 +260,7 @@ def send_keys(self, *value: str) -> None: """Simulates typing into the element. Parameters: - ---------- + ----------- value : str - A string for typing, or setting form fields. For setting file inputs, this could be a local file path. @@ -383,7 +383,7 @@ def value_of_css_property(self, property_name) -> str: """The value of a CSS property. Parameters: - ---------- + ----------- property_name : str - The name of the CSS property to get the value of. @@ -494,7 +494,7 @@ def screenshot(self, filename) -> bool: bool : True if the screenshot was saved successfully, False otherwise. Parameters: - ---------- + ----------- filename : str The full path you wish to save your screenshot to. This should end with a `.png` extension. @@ -555,7 +555,7 @@ def _execute(self, command, params=None): """Executes a command against the underlying HTML element. Parameters: - ---------- + ----------- command : any The name of the command to _execute as a string. @@ -575,7 +575,7 @@ def find_element(self, by=By.ID, value=None) -> WebElement: """Find an element given a By strategy and locator. Parameters: - ---------- + ----------- by : selenium.webdriver.common.by.By The locating strategy to use. Default is `By.ID`. Supported values include: - By.ID: Locate by element ID. @@ -604,7 +604,7 @@ def find_elements(self, by=By.ID, value=None) -> List[WebElement]: """Find elements given a By strategy and locator. Parameters: - ---------- + ----------- by : selenium.webdriver.common.by.By The locating strategy to use. Default is `By.ID`. Supported values include: - By.ID: Locate by element ID. diff --git a/py/selenium/webdriver/support/expected_conditions.py b/py/selenium/webdriver/support/expected_conditions.py index 286bbbfbebc34..fd3c81f5f58a6 100644 --- a/py/selenium/webdriver/support/expected_conditions.py +++ b/py/selenium/webdriver/support/expected_conditions.py @@ -49,7 +49,7 @@ def title_is(title: str) -> Callable[[WebDriver], bool]: """An expectation for checking the title of a page. Parameters: - ---------- + ----------- title : str The expected title, which must be an exact match. @@ -69,7 +69,7 @@ def title_contains(title: str) -> Callable[[WebDriver], bool]: substring. Parameters: - ---------- + ----------- title : str The fragment of title expected. @@ -89,7 +89,7 @@ def presence_of_element_located(locator: Tuple[str, str]) -> Callable[[WebDriver page. This does not necessarily mean that the element is visible. Parameters: - ---------- + ----------- locator : Tuple[str, str] Used to find the element. @@ -117,7 +117,7 @@ def url_contains(url: str) -> Callable[[WebDriver], bool]: sensitive substring. Parameters: - ---------- + ----------- url : str The fragment of url expected. @@ -136,7 +136,7 @@ def url_matches(pattern: str) -> Callable[[WebDriver], bool]: """An expectation for checking the current url. Parameters: - ---------- + ----------- pattern : str The pattern to match with the current url. @@ -159,7 +159,7 @@ def url_to_be(url: str) -> Callable[[WebDriver], bool]: """An expectation for checking the current url. Parameters: - ---------- + ----------- url : str The expected url, which must be an exact match. @@ -179,7 +179,7 @@ def url_changes(url: str) -> Callable[[WebDriver], bool]: string. Parameters: - ---------- + ----------- url : str The expected url, which must not be an exact match. @@ -202,7 +202,7 @@ def visibility_of_element_located( but also has a height and width that is greater than 0. Parameters: - ---------- + ----------- locator : Tuple[str, str] Used to find the element. @@ -233,7 +233,7 @@ def visibility_of(element: WebElement) -> Callable[[Any], Union[Literal[False], DOM of a page, is visible. Parameters: - ---------- + ----------- element : WebElement The WebElement to check. @@ -267,7 +267,7 @@ def _element_if_visible(element: WebElement, visibility: bool = True) -> Union[L DOM of a page, is of the expected visibility. Parameters: - ---------- + ----------- element : WebElement The WebElement to check. visibility : bool @@ -285,7 +285,7 @@ def presence_of_all_elements_located(locator: Tuple[str, str]) -> Callable[[WebD on a web page. Parameters: - ---------- + ----------- locator : Tuple[str, str] Used to find the element. @@ -313,7 +313,7 @@ def visibility_of_any_elements_located(locator: Tuple[str, str]) -> Callable[[We on a web page. Parameters: - ---------- + ----------- locator : Tuple[str, str] Used to find the element. @@ -344,7 +344,7 @@ def visibility_of_all_elements_located( displayed but also has a height and width that is greater than 0. Parameters: - ---------- + ----------- locator : Tuple[str, str] Used to find the elements. @@ -379,7 +379,7 @@ def text_to_be_present_in_element(locator: Tuple[str, str], text_: str) -> Calla specified element. Parameters: - ---------- + ----------- locator : Tuple[str, str] Used to find the element. text_ : str @@ -415,7 +415,7 @@ def text_to_be_present_in_element_value( element's value. Parameters: - ---------- + ----------- locator : Tuple[str, str] Used to find the element. text_ : str @@ -451,7 +451,7 @@ def text_to_be_present_in_element_attribute( element's attribute. Parameters: - ---------- + ----------- locator : Tuple[str, str] Used to find the element. attribute_ : str @@ -492,7 +492,7 @@ def frame_to_be_available_and_switch_to_it( switch to. Parameters: - ---------- + ----------- locator : Union[Tuple[str, str], str, WebElement] Used to find the frame. @@ -533,7 +533,7 @@ def invisibility_of_element_located( present on the DOM. Parameters: - ---------- + ----------- locator : Union[WebElement, Tuple[str, str]] Used to find the element. @@ -582,7 +582,7 @@ def invisibility_of_element( present on the DOM. Parameters: - ---------- + ----------- element : Union[WebElement, Tuple[str, str]] Used to find the element. @@ -608,7 +608,7 @@ def element_to_be_clickable( you can click it. Parameters: - ---------- + ----------- mark : Union[WebElement, Tuple[str, str]] Used to find the element. @@ -643,7 +643,7 @@ def staleness_of(element: WebElement) -> Callable[[Any], bool]: """Wait until an element is no longer attached to the DOM. Parameters: - ---------- + ----------- element : WebElement The element to wait for. @@ -675,7 +675,7 @@ def element_to_be_selected(element: WebElement) -> Callable[[Any], bool]: """An expectation for checking the selection is selected. Parameters: - ---------- + ----------- element : WebElement The WebElement to check. @@ -702,7 +702,7 @@ def element_located_to_be_selected(locator: Tuple[str, str]) -> Callable[[WebDri """An expectation for the element to be located is selected. Parameters: - ---------- + ----------- locator : Tuple[str, str] Used to find the element. @@ -729,7 +729,7 @@ def element_selection_state_to_be(element: WebElement, is_selected: bool) -> Cal """An expectation for checking if the given element is selected. Parameters: - ---------- + ----------- element : WebElement The WebElement to check. is_selected : bool @@ -760,7 +760,7 @@ def element_located_selection_state_to_be( specified is in that state. Parameters: - ---------- + ----------- locator : Tuple[str, str] Used to find the element. is_selected : bool @@ -792,7 +792,7 @@ def number_of_windows_to_be(num_windows: int) -> Callable[[WebDriver], bool]: """An expectation for the number of windows to be a certain value. Parameters: - ---------- + ----------- num_windows : int The expected number of windows. @@ -819,7 +819,7 @@ def new_window_is_opened(current_handles: List[str]) -> Callable[[WebDriver], bo windows handles increase. Parameters: - ---------- + ----------- current_handles : List[str] The current window handles. @@ -875,7 +875,7 @@ def element_attribute_to_include(locator: Tuple[str, str], attribute_: str) -> C specified element. Parameters: - ---------- + ----------- locator : Tuple[str, str] Used to find the element. attribute_ : str @@ -908,7 +908,7 @@ def any_of(*expected_conditions: Callable[[D], T]) -> Callable[[D], Union[Litera """An expectation that any of multiple expected conditions is true. Parameters: - ---------- + ----------- expected_conditions : Callable[[D], T] The list of expected conditions to check. @@ -950,7 +950,7 @@ def all_of( """An expectation that all of multiple expected conditions is true. Parameters: - ---------- + ----------- expected_conditions : Callable[[D], Union[T, Literal[False]]] The list of expected conditions to check. @@ -993,7 +993,7 @@ def none_of(*expected_conditions: Callable[[D], Any]) -> Callable[[D], bool]: """An expectation that none of 1 or multiple expected conditions is true. Parameters: - ---------- + ----------- expected_conditions : Callable[[D], Any] The list of expected conditions to check. diff --git a/py/selenium/webdriver/support/relative_locator.py b/py/selenium/webdriver/support/relative_locator.py index 33b09745ba74b..409a31ab0a291 100644 --- a/py/selenium/webdriver/support/relative_locator.py +++ b/py/selenium/webdriver/support/relative_locator.py @@ -32,7 +32,7 @@ def with_tag_name(tag_name: str) -> "RelativeBy": """Start searching for relative objects using a tag name. Parameters: - ---------- + ----------- tag_name : str The DOM tag of element to start searching. @@ -63,7 +63,7 @@ def locate_with(by: ByType, using: str) -> "RelativeBy": """Start searching for relative objects your search criteria with By. Parameters: - ---------- + ----------- by : ByType The method to find the element. @@ -106,7 +106,7 @@ def __init__(self, root: Optional[Dict[ByType, str]] = None, filters: Optional[L `locate_with` method as this signature could change. Attributes: - ---------- + ----------- root : Dict[By, str] - A dict with `By` enum as the key and the search query as the value @@ -127,7 +127,7 @@ def above(self, element_or_locator: Union[WebElement, LocatorType, None] = None) """Add a filter to look for elements above. Parameters: - ---------- + ----------- element_or_locator : Union[WebElement, Dict, None] Element to look above @@ -161,7 +161,7 @@ def below(self, element_or_locator: Union[WebElement, Dict, None] = None) -> "Re """Add a filter to look for elements below. Parameters: - ---------- + ----------- element_or_locator : Union[WebElement, Dict, None] Element to look below @@ -195,7 +195,7 @@ def to_left_of(self, element_or_locator: Union[WebElement, Dict, None] = None) - """Add a filter to look for elements to the left of. Parameters: - ---------- + ----------- element_or_locator : Union[WebElement, Dict, None] Element to look to the left of @@ -229,7 +229,7 @@ def to_right_of(self, element_or_locator: Union[WebElement, Dict, None] = None) """Add a filter to look for elements right of. Parameters: - ---------- + ----------- element_or_locator : Union[WebElement, Dict, None] Element to look right of @@ -335,7 +335,7 @@ def near(self, element_or_locator: Union[WebElement, LocatorType, None] = None, """Add a filter to look for elements near. Parameters: - ---------- + ----------- element_or_locator : Union[WebElement, Dict, None] Element to look near by the element or within a distance diff --git a/py/selenium/webdriver/support/wait.py b/py/selenium/webdriver/support/wait.py index 89951578cd722..dc23d87946295 100644 --- a/py/selenium/webdriver/support/wait.py +++ b/py/selenium/webdriver/support/wait.py @@ -49,7 +49,7 @@ def __init__( """Constructor, takes a WebDriver instance and timeout in seconds. Attributes: - ---------- + ----------- driver - Instance of WebDriver (Ie, Firefox, Chrome or Remote) or a WebElement @@ -99,7 +99,7 @@ def until(self, method: Callable[[D], Union[Literal[False], T]], message: str = return value does not evaluate to ``False``. Parameters: - ---------- + ----------- method: callable(WebDriver) - A callable object that takes a WebDriver instance as an argument. @@ -152,7 +152,7 @@ def until_not(self, method: Callable[[D], T], message: str = "") -> Union[T, Lit return value does not evaluate to ``False``. Parameters: - ---------- + ----------- method: callable(WebDriver) - A callable object that takes a WebDriver instance as an argument. From 9b4b27397262752c2ab774d0dac058b0a519bd51 Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Thu, 20 Mar 2025 17:44:26 -0400 Subject: [PATCH 4/7] [py] Fix 1 more docstring --- py/selenium/webdriver/remote/webdriver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/selenium/webdriver/remote/webdriver.py b/py/selenium/webdriver/remote/webdriver.py index 21db7809f4a39..dbcbd9dd37c0c 100644 --- a/py/selenium/webdriver/remote/webdriver.py +++ b/py/selenium/webdriver/remote/webdriver.py @@ -819,7 +819,7 @@ def set_page_load_timeout(self, time_to_wait: float) -> None: - The amount of time to wait (in seconds) Example: - ------- + -------- >>> driver.set_page_load_timeout(30) """ try: From aba26f3fa347cae128d4b88fac7fd0d6b51b3e83 Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Thu, 20 Mar 2025 18:45:30 -0400 Subject: [PATCH 5/7] Update py/selenium/webdriver/common/options.py Co-authored-by: qodo-merge-pro[bot] <151058649+qodo-merge-pro[bot]@users.noreply.github.com> --- py/selenium/webdriver/common/options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/selenium/webdriver/common/options.py b/py/selenium/webdriver/common/options.py index 20d07021efbdf..658e4c4a549ca 100644 --- a/py/selenium/webdriver/common/options.py +++ b/py/selenium/webdriver/common/options.py @@ -285,7 +285,7 @@ class BaseOptions(metaclass=ABCMeta): """ web_socket_url = _BaseOptionsDescriptor("webSocketUrl") - """Gets and Set whether the session accepts insecure certificates. + """Gets and Sets WebSocket URL. Usage: ------ From 3af1b2bcf1a7efadacf940a8bb16337acc1e3cef Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Thu, 20 Mar 2025 18:49:19 -0400 Subject: [PATCH 6/7] [py] Fix parameter type for websocket_url --- py/selenium/webdriver/common/options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/selenium/webdriver/common/options.py b/py/selenium/webdriver/common/options.py index 658e4c4a549ca..089f57760c887 100644 --- a/py/selenium/webdriver/common/options.py +++ b/py/selenium/webdriver/common/options.py @@ -430,7 +430,7 @@ class BaseOptions(metaclass=ABCMeta): Parameters: ----------- - `value`: `bool` + `value`: `str` Returns: -------- From 2fe8e773ad664bff6542376f1c72fd7bd735de5d Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Thu, 20 Mar 2025 18:52:42 -0400 Subject: [PATCH 7/7] [py] Remove duplicate web_socket_url from BaseOptions --- py/selenium/webdriver/common/options.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/py/selenium/webdriver/common/options.py b/py/selenium/webdriver/common/options.py index 089f57760c887..111fd32eb5673 100644 --- a/py/selenium/webdriver/common/options.py +++ b/py/selenium/webdriver/common/options.py @@ -284,28 +284,6 @@ class BaseOptions(metaclass=ABCMeta): - `None` """ - web_socket_url = _BaseOptionsDescriptor("webSocketUrl") - """Gets and Sets WebSocket URL. - - Usage: - ------ - - Get - - `self.web_socket_url` - - Set - - `self.web_socket_url` = `value` - - Parameters: - ----------- - `value`: `str` - - Returns: - -------- - - Get - - `str` or `None` - - Set - - `None` - """ - page_load_strategy = _PageLoadStrategyDescriptor("pageLoadStrategy") """:Gets and Sets page load strategy, the default is "normal".