Skip to content
Merged
1 change: 0 additions & 1 deletion py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ extend-ignore = [
"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
"D417", # Missing argument descriptions in the docstring for `__init__`
]

[tool.ruff.format]
Expand Down
2 changes: 2 additions & 0 deletions py/selenium/webdriver/common/action_chains.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ def __init__(self, driver: WebDriver, duration: int = 250, devices: list[AnyDevi
Args:
driver: The WebDriver instance which performs user actions.
duration: override the default 250 msecs of DEFAULT_MOVE_DURATION in PointerInput
devices: Optional list of input devices (PointerInput, KeyInput, WheelInput) to use.
If not provided, default devices will be created.
"""
self._driver = driver
mouse = None
Expand Down
9 changes: 6 additions & 3 deletions py/selenium/webdriver/common/actions/pointer_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@

class PointerActions(Interaction):
def __init__(self, source: Optional[PointerInput] = None, duration: int = 250):
"""
"""Initialize a new PointerActions instance.

Args:
- source: PointerInput instance
- duration: override the default 250 msecs of DEFAULT_MOVE_DURATION in source
source: Optional PointerInput instance. If not provided, a default
mouse PointerInput will be created.
duration: Override the default 250 msecs of DEFAULT_MOVE_DURATION
in the source.
"""
if source is None:
source = PointerInput(interaction.POINTER_MOUSE, "mouse")
Expand Down
1 change: 1 addition & 0 deletions py/selenium/webdriver/ie/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def __init__(
log_output: (Optional) int representation of STDOUT/DEVNULL, any IO instance or String path to file.
Default is "stdout".
driver_path_env_key: (Optional) Environment variable to use to get the path to the driver executable.
**kwargs: Additional keyword arguments to pass to the parent Service class.
"""
self._service_args = list(service_args or [])
driver_path_env_key = driver_path_env_key or "SE_IEDRIVER"
Expand Down
2 changes: 2 additions & 0 deletions py/selenium/webdriver/remote/shadowroot.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def find_element(self, by: str = By.ID, value: str = None):
- By.LINK_TEXT: Locate a link element by its exact text.
- By.PARTIAL_LINK_TEXT: Locate a link element by partial text match.
- RelativeBy: Locate elements relative to a specified root element.
value: The locator value to use with the specified `by` strategy.

Returns:
The first matching `WebElement` found on the page.
Expand Down Expand Up @@ -94,6 +95,7 @@ def find_elements(self, by: str = By.ID, value: str = None) -> list:
- By.LINK_TEXT: Locate a link element by its exact text.
- By.PARTIAL_LINK_TEXT: Locate a link element by partial text match.
- RelativeBy: Locate elements relative to a specified root element.
value: The locator value to use with the specified `by` strategy.

Returns:
List of `WebElements` matching locator strategy found on the page.
Expand Down
4 changes: 4 additions & 0 deletions py/selenium/webdriver/remote/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,7 @@ def find_element(self, by=By.ID, value: Optional[str] = None) -> WebElement:
values include: By.ID, By.NAME, By.XPATH, By.CSS_SELECTOR,
By.CLASS_NAME, By.TAG_NAME, By.LINK_TEXT, By.PARTIAL_LINK_TEXT,
or RelativeBy.
value: The locator value to use with the specified `by` strategy.

Returns:
The first matching WebElement found on the page.
Expand All @@ -847,6 +848,7 @@ def find_elements(self, by=By.ID, value: Optional[str] = None) -> list[WebElemen
values include: By.ID, By.NAME, By.XPATH, By.CSS_SELECTOR,
By.CLASS_NAME, By.TAG_NAME, By.LINK_TEXT, By.PARTIAL_LINK_TEXT,
or RelativeBy.
value: The locator value to use with the specified `by` strategy.

Returns:
List of WebElements matching locator strategy found on the page.
Expand Down Expand Up @@ -943,6 +945,7 @@ def set_window_size(self, width, height, windowHandle: str = "current") -> None:
Args:
width: The width in pixels to set the window to.
height: The height in pixels to set the window to.
windowHandle: The handle of the window to resize. Default is "current".

Example:
>>> driver.set_window_size(800, 600)
Expand Down Expand Up @@ -970,6 +973,7 @@ def set_window_position(self, x: float, y: float, windowHandle: str = "current")
Args:
x: The x-coordinate in pixels to set the window position.
y: The y-coordinate in pixels to set the window position.
windowHandle: The handle of the window to reposition. Default is "current".

Example:
>>> driver.set_window_position(0, 0)
Expand Down
2 changes: 2 additions & 0 deletions py/selenium/webdriver/remote/webelement.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ def find_element(self, by=By.ID, value=None) -> WebElement:
- By.LINK_TEXT: Locate a link element by its exact text.
- By.PARTIAL_LINK_TEXT: Locate a link element by partial text match.
- RelativeBy: Locate elements relative to a specified root element.
value: The locator value to use with the specified `by` strategy.

Returns:
The first matching `WebElement` found on the page.
Expand All @@ -548,6 +549,7 @@ def find_elements(self, by=By.ID, value=None) -> list[WebElement]:
- By.LINK_TEXT: Locate a link element by its exact text.
- By.PARTIAL_LINK_TEXT: Locate a link element by partial text match.
- RelativeBy: Locate elements relative to a specified root element.
value: The locator value to use with the specified `by` strategy.

Returns:
List of `WebElements` matching locator strategy found on the page.
Expand Down