@@ -213,7 +213,9 @@ def drag_mouse(
213213 path : Iterable [Iterable [int ]],
214214 button : Literal ["left" , "middle" , "right" ] | Omit = omit ,
215215 delay : int | Omit = omit ,
216+ duration_ms : int | Omit = omit ,
216217 hold_keys : SequenceNotStr [str ] | Omit = omit ,
218+ smooth : bool | Omit = omit ,
217219 step_delay_ms : int | Omit = omit ,
218220 steps_per_segment : int | Omit = omit ,
219221 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -234,8 +236,14 @@ def drag_mouse(
234236
235237 delay: Delay in milliseconds between button down and starting to move along the path.
236238
239+ duration_ms: Target total duration in milliseconds for the entire drag movement when
240+ smooth=true. Omit for automatic timing based on total path length.
241+
237242 hold_keys: Modifier keys to hold during the drag
238243
244+ smooth: Use human-like Bezier curves between path waypoints instead of linear
245+ interpolation. When true, steps_per_segment and step_delay_ms are ignored.
246+
239247 step_delay_ms: Delay in milliseconds between relative steps while dragging (not the initial
240248 delay).
241249
@@ -259,7 +267,9 @@ def drag_mouse(
259267 "path" : path ,
260268 "button" : button ,
261269 "delay" : delay ,
270+ "duration_ms" : duration_ms ,
262271 "hold_keys" : hold_keys ,
272+ "smooth" : smooth ,
263273 "step_delay_ms" : step_delay_ms ,
264274 "steps_per_segment" : steps_per_segment ,
265275 },
@@ -804,7 +814,9 @@ async def drag_mouse(
804814 path : Iterable [Iterable [int ]],
805815 button : Literal ["left" , "middle" , "right" ] | Omit = omit ,
806816 delay : int | Omit = omit ,
817+ duration_ms : int | Omit = omit ,
807818 hold_keys : SequenceNotStr [str ] | Omit = omit ,
819+ smooth : bool | Omit = omit ,
808820 step_delay_ms : int | Omit = omit ,
809821 steps_per_segment : int | Omit = omit ,
810822 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -825,8 +837,14 @@ async def drag_mouse(
825837
826838 delay: Delay in milliseconds between button down and starting to move along the path.
827839
840+ duration_ms: Target total duration in milliseconds for the entire drag movement when
841+ smooth=true. Omit for automatic timing based on total path length.
842+
828843 hold_keys: Modifier keys to hold during the drag
829844
845+ smooth: Use human-like Bezier curves between path waypoints instead of linear
846+ interpolation. When true, steps_per_segment and step_delay_ms are ignored.
847+
830848 step_delay_ms: Delay in milliseconds between relative steps while dragging (not the initial
831849 delay).
832850
@@ -850,7 +868,9 @@ async def drag_mouse(
850868 "path" : path ,
851869 "button" : button ,
852870 "delay" : delay ,
871+ "duration_ms" : duration_ms ,
853872 "hold_keys" : hold_keys ,
873+ "smooth" : smooth ,
854874 "step_delay_ms" : step_delay_ms ,
855875 "steps_per_segment" : steps_per_segment ,
856876 },
0 commit comments