Skip to content

Commit 514e406

Browse files
[py] added more detailed docstring in _IeOptionsDescriptor class. (#12552)
1 parent d124c60 commit 514e406

File tree

2 files changed

+36
-21
lines changed

2 files changed

+36
-21
lines changed

py/selenium/webdriver/ie/options.py

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,40 @@ class ElementScrollBehavior(Enum):
2626

2727

2828
class _IeOptionsDescriptor:
29-
"""IeOptionsDescriptor which validates below attributes of Options class:
30-
31-
- BROWSER_ATTACH_TIMEOUT
32-
- ELEMENT_SCROLL_BEHAVIOR
33-
- ENSURE_CLEAN_SESSION
34-
- FILE_UPLOAD_DIALOG_TIMEOUT
35-
- FORCE_CREATE_PROCESS_API
36-
- FORCE_SHELL_WINDOWS_API
37-
- FULL_PAGE_SCREENSHOT
38-
- IGNORE_PROTECTED_MODE_SETTINGS
39-
- IGNORE_ZOOM_LEVEL
40-
- INITIAL_BROWSER_URL
41-
- NATIVE_EVENTS
42-
- PERSISTENT_HOVER
43-
- REQUIRE_WINDOW_FOCUS
44-
- USE_PER_PROCESS_PROXY
45-
- USE_LEGACY_FILE_UPLOAD_DIALOG_HANDLING
46-
- ATTACH_TO_EDGE_CHROME
47-
- EDGE_EXECUTABLE_PATH
29+
"""_IeOptionsDescriptor is an implementation of Descriptor Protocol:
30+
31+
: Any look-up or assignment to the below attributes in `Options` class will be intercepted
32+
by `__get__` and `__set__` method respectively.
33+
34+
- `browser_attach_timeout`
35+
- `element_scroll_behavior`
36+
- `ensure_clean_session`
37+
- `file_upload_dialog_timeout`
38+
- `force_create_process_api`
39+
- `force_shell_windows_api`
40+
- `full_page_screenshot`
41+
- `ignore_protected_mode_settings`
42+
- `ignore_zoom_level`
43+
- `initial_browser_url`
44+
- `native_events`
45+
- `persistent_hover`
46+
- `require_window_focus`
47+
- `use_per_process_proxy`
48+
- `use_legacy_file_upload_dialog_handling`
49+
- `attach_to_edge_chrome`
50+
- `edge_executable_path`
51+
52+
53+
: When an attribute lookup happens,
54+
Example:
55+
`self. browser_attach_timeout`
56+
`__get__` method does a dictionary look up in the dictionary `_options` in `Options` class
57+
and returns the value of key `browserAttachTimeout`
58+
: When an attribute assignment happens,
59+
Example:
60+
`self.browser_attach_timeout` = 30
61+
`__set__` method sets/updates the value of the key `browserAttachTimeout` in `_options`
62+
dictionary in `Options` class.
4863
"""
4964

5065
def __init__(self, name, expected_type):

py/selenium/webdriver/remote/remote_connection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ def reset_timeout(cls):
162162
def get_certificate_bundle_path(cls):
163163
"""
164164
:Returns:
165-
Paths of the .pem encoded certificate to verify connection to command executor. Defaults
166-
to certifi.where() or REQUESTS_CA_BUNDLE env variable if set.
165+
Paths of the .pem encoded certificate to verify connection to command executor. Defaults
166+
to certifi.where() or REQUESTS_CA_BUNDLE env variable if set.
167167
"""
168168
return cls._ca_certs
169169

0 commit comments

Comments
 (0)