[py] deprecate rather than deleting basic scroll action method
"""
The ActionChains implementation,
"""
+import warnings
+
from .actions.wheel_input import ScrollOrigin
from .utils import keys_to_typing
@@ -373,6 +375,26 @@ class ActionChains:
delta_y=delta_y)
return self
+ def scroll(self, x: int, y: int, delta_x: int, delta_y: int, duration: int = 0, origin: str = "viewport"):
+ """
+ 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):
