Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[py] added more detailed docstring in _IeOptionsDescriptor class. #12552

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 34 additions & 19 deletions py/selenium/webdriver/ie/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,40 @@ class ElementScrollBehavior(Enum):


class _IeOptionsDescriptor:
"""IeOptionsDescriptor which validates below attributes of Options class:

- BROWSER_ATTACH_TIMEOUT
- ELEMENT_SCROLL_BEHAVIOR
- ENSURE_CLEAN_SESSION
- FILE_UPLOAD_DIALOG_TIMEOUT
- FORCE_CREATE_PROCESS_API
- FORCE_SHELL_WINDOWS_API
- FULL_PAGE_SCREENSHOT
- IGNORE_PROTECTED_MODE_SETTINGS
- IGNORE_ZOOM_LEVEL
- INITIAL_BROWSER_URL
- NATIVE_EVENTS
- PERSISTENT_HOVER
- REQUIRE_WINDOW_FOCUS
- USE_PER_PROCESS_PROXY
- USE_LEGACY_FILE_UPLOAD_DIALOG_HANDLING
- ATTACH_TO_EDGE_CHROME
- EDGE_EXECUTABLE_PATH
"""_IeOptionsDescriptor is an implementation of Descriptor Protocol:

: Any look-up or assignment to the below attributes in `Options` class will be intercepted
by `__get__` and `__set__` method respectively.

- `browser_attach_timeout`
- `element_scroll_behavior`
- `ensure_clean_session`
- `file_upload_dialog_timeout`
- `force_create_process_api`
- `force_shell_windows_api`
- `full_page_screenshot`
- `ignore_protected_mode_settings`
- `ignore_zoom_level`
- `initial_browser_url`
- `native_events`
- `persistent_hover`
- `require_window_focus`
- `use_per_process_proxy`
- `use_legacy_file_upload_dialog_handling`
- `attach_to_edge_chrome`
- `edge_executable_path`


: When an attribute lookup happens,
Example:
`self. browser_attach_timeout`
`__get__` method does a dictionary look up in the dictionary `_options` in `Options` class
and returns the value of key `browserAttachTimeout`
: When an attribute assignment happens,
Example:
`self.browser_attach_timeout` = 30
`__set__` method sets/updates the value of the key `browserAttachTimeout` in `_options`
dictionary in `Options` class.
"""

def __init__(self, name, expected_type):
Expand Down
4 changes: 2 additions & 2 deletions py/selenium/webdriver/remote/remote_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ def reset_timeout(cls):
def get_certificate_bundle_path(cls):
"""
:Returns:
Paths of the .pem encoded certificate to verify connection to command executor. Defaults
to certifi.where() or REQUESTS_CA_BUNDLE env variable if set.
Paths of the .pem encoded certificate to verify connection to command executor. Defaults
to certifi.where() or REQUESTS_CA_BUNDLE env variable if set.
"""
return cls._ca_certs

Expand Down