Skip to content

Commit

Permalink
[py]: Remove deprecated ActionChains.scroll(...)
Browse files Browse the repository at this point in the history
  • Loading branch information
symonk committed Jul 25, 2023
1 parent 91ef191 commit 9b7c1fb
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions py/selenium/webdriver/common/action_chains.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,28 +381,6 @@ def scroll_from_origin(self, scroll_origin: ScrollOrigin, delta_x: int, delta_y:
)
return self

def scroll(
self, x: int, y: int, delta_x: int, delta_y: int, duration: int = 0, origin: str = "viewport"
) -> "ActionChains":
"""Sends wheel scroll information to the browser to be processed.
:Args:
- x: starting X coordinate
- y: starting Y coordinate
- delta_x: the distance the mouse will scroll on the x axis
- delta_y: the distance the mouse will scroll on the y axis
"""
warnings.warn(
"scroll() has been deprecated, please use scroll_to_element(), scroll_by_amount() or scroll_from_origin().",
DeprecationWarning,
stacklevel=2,
)

self.w3c_actions.wheel_action.scroll(
x=x, y=y, delta_x=delta_x, delta_y=delta_y, duration=duration, origin=origin
)
return self

# Context manager so ActionChains can be used in a 'with .. as' statements.

def __enter__(self) -> "ActionChains":
Expand Down

0 comments on commit 9b7c1fb

Please sign in to comment.