Skip to content
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
2 changes: 0 additions & 2 deletions py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ target-version = "py39"
[tool.ruff.lint]
extend-select = ["D", "E4", "E7", "E9", "F", "I", "E501", "RUF022", "TID252"]
fixable = ["ALL"]
# remove these as we cleanup docstrings
extend-ignore = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
Expand All @@ -157,7 +156,6 @@ extend-ignore = [
"D107", # Missing docstring in `__init__`
"D205", # 1 blank line required between summary line and description
"D212", # Multi-line docstring summary should start at the first line
"D415", # First line should end with a period, question mark, or exclamation point
]

[tool.ruff.format]
Expand Down
14 changes: 8 additions & 6 deletions py/selenium/webdriver/chromium/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def set_network_conditions(self, **network_conditions) -> None:
upload_throughput=500 * 1024,
) # maximal throughput

Note: 'throughput' can be used to set both (for download and upload).
Note: `throughput` can be used to set both (for download and upload).
"""
self.execute("setNetworkConditions", {"network_conditions": network_conditions})

Expand All @@ -126,17 +126,19 @@ def set_permissions(self, name: str, value: str) -> None:
self.execute("setPermissions", {"descriptor": {"name": name}, "state": value})

def execute_cdp_cmd(self, cmd: str, cmd_args: dict):
"""Execute Chrome Devtools Protocol command and get returned result The
command and command args should follow chrome devtools protocol
domains/commands, refer to link
https://chromedevtools.github.io/devtools-protocol/
"""Execute Chrome Devtools Protocol command and get returned result.

The command and command args should follow chrome devtools protocol domains/commands

See:
- https://chromedevtools.github.io/devtools-protocol/

Args:
cmd: A str, command name
cmd_args: A dict, command args. empty dict {} if there is no command args

Example:
driver.execute_cdp_cmd('Network.getResponseBody', {'requestId': requestId})
`driver.execute_cdp_cmd('Network.getResponseBody', {'requestId': requestId})`

Returns:
A dict, empty dict {} if there is no result to return.
Expand Down
19 changes: 12 additions & 7 deletions py/selenium/webdriver/common/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ def __set__(self, obj, value):


class _PageLoadStrategyDescriptor:
"""Determines the point at which a navigation command is returned:
https://w3c.github.io/webdriver/#dfn-table-of-page-load-strategies.
"""Determines the point at which a navigation command is returned.

See:
- https://w3c.github.io/webdriver/#dfn-table-of-page-load-strategies.

Args:
strategy: the strategy corresponding to a document readiness state
Expand All @@ -86,9 +88,10 @@ def __set__(self, obj, value):


class _UnHandledPromptBehaviorDescriptor:
"""How the driver should respond when an alert is present and the:
command sent is not handling the alert:
https://w3c.github.io/webdriver/#dfn-table-of-page-load-strategies:
"""How the driver should respond when an alert is present and the command sent is not handling the alert.

See:
- https://w3c.github.io/webdriver/#dfn-table-of-page-load-strategies:

Args:
behavior: behavior to use when an alert is encountered
Expand All @@ -114,8 +117,10 @@ def __set__(self, obj, value):


class _TimeoutsDescriptor:
"""How long the driver should wait for actions to complete before:
returning an error https://w3c.github.io/webdriver/#timeouts:
"""How long the driver should wait for actions to complete before returning an error.

See:
- https://w3c.github.io/webdriver/#timeouts

Args:
timeouts: values in milliseconds for implicit wait, page load and script timeout
Expand Down
Loading