@@ -46,7 +46,7 @@ def default_move_duration
4646 # @return [ActionBuilder] A self reference.
4747 #
4848
49- def pointer_down ( button , device : nil , **opts )
49+ def pointer_down ( button = :left , device : nil , **opts )
5050 button_action ( button , :create_pointer_down , device : device , **opts )
5151 end
5252
@@ -63,7 +63,7 @@ def pointer_down(button, device: nil, **opts)
6363 # @return [ActionBuilder] A self reference.
6464 #
6565
66- def pointer_up ( button , device : nil , **opts )
66+ def pointer_up ( button = :left , device : nil , **opts )
6767 button_action ( button , :create_pointer_up , device : device , **opts )
6868 end
6969
@@ -96,7 +96,7 @@ def pointer_up(button, device: nil, **opts)
9696 # @return [ActionBuilder] A self reference.
9797 #
9898
99- def move_to ( element , right_by = nil , down_by = nil , device : nil , **opts )
99+ def move_to ( element , right_by = nil , down_by = nil , device : nil , duration : default_move_duration , **opts )
100100 pointer = pointer_input ( device )
101101 if right_by || down_by
102102 size = element . size
@@ -108,7 +108,7 @@ def move_to(element, right_by = nil, down_by = nil, device: nil, **opts)
108108 left = 0
109109 top = 0
110110 end
111- pointer . create_pointer_move ( duration : default_move_duration ,
111+ pointer . create_pointer_move ( duration : duration ,
112112 x : left ,
113113 y : top ,
114114 origin : element ,
@@ -134,9 +134,9 @@ def move_to(element, right_by = nil, down_by = nil, device: nil, **opts)
134134 # @raise [MoveTargetOutOfBoundsError] if the provided offset is outside the document's boundaries.
135135 #
136136
137- def move_by ( right_by , down_by , device : nil )
137+ def move_by ( right_by , down_by , device : nil , duration : default_move_duration )
138138 pointer = pointer_input ( device )
139- pointer . create_pointer_move ( duration : default_move_duration ,
139+ pointer . create_pointer_move ( duration : duration ,
140140 x : Integer ( right_by ) ,
141141 y : Integer ( down_by ) ,
142142 origin : Interactions ::PointerMove ::POINTER )
@@ -161,9 +161,9 @@ def move_by(right_by, down_by, device: nil)
161161 # @raise [MoveTargetOutOfBoundsError] if the provided x or y value is outside the document's boundaries.
162162 #
163163
164- def move_to_location ( x , y , device : nil )
164+ def move_to_location ( x , y , device : nil , duration : default_move_duration )
165165 pointer = pointer_input ( device )
166- pointer . create_pointer_move ( duration : default_move_duration ,
166+ pointer . create_pointer_move ( duration : duration ,
167167 x : Integer ( x ) ,
168168 y : Integer ( y ) ,
169169 origin : Interactions ::PointerMove ::VIEWPORT )
0 commit comments