File tree 1 file changed +23
-0
lines changed
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,29 @@ def tap(opts)
84
84
chain_method ( :tap , args )
85
85
end
86
86
87
+ # Double tap an element on the screen
88
+ #
89
+ # @option opts [WebDriver::Element] :element (Optional) Element to restrict scope too.
90
+ # @option opts [integer] :x x co-ordinate to tap
91
+ # @option opts [integer] :y y co-ordinate to tap
92
+
93
+ def double_tap ( opts )
94
+ args = opts . select { |k , _v | [ :element , :x , :y ] . include? k }
95
+ args = args_with_ele_ref ( args )
96
+ chain_method ( :doubleTap , args ) # doubleTap is what the appium server expects
97
+ end
98
+
99
+ # Two finger tap an element on the screen
100
+ #
101
+ # @option opts [WebDriver::Element] :element (Optional) Element to restrict scope too.
102
+ # @option opts [integer] :x x co-ordinate to tap
103
+ # @option opts [integer] :y y co-ordinate to tap
104
+ def two_finger_tap ( opts )
105
+ args = opts . select { |k , _v | [ :element , :x , :y ] . include? k }
106
+ args = args_with_ele_ref ( args )
107
+ chain_method ( :twoFingerTap , args ) # twoFingerTap is what the appium server expects
108
+ end
109
+
87
110
# Pause for a number of milliseconds before the next action
88
111
# @param milliseconds [integer] Number of milliseconds to pause for
89
112
def wait ( milliseconds )
You can’t perform that action at this time.
0 commit comments