Skip to content

Commit 1efed4c

Browse files
authored
add documentation for alternative long_press method (#440)
1 parent 71e629f commit 1efed4c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/appium_lib/device/touch_actions.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ def move_to(opts)
3939
end
4040

4141
# Press down for a specific duration.
42+
# Alternatively, you can use `press(...).wait(...).release()` instead of `long_press` if duration doesn't work well.
43+
# https://github.com/appium/ruby_lib/issues/231#issuecomment-269895512
44+
# e.g. Appium::TouchAction.new.press(x: 280, y: 530).wait(2000).release.perform
45+
#
4246
# @option element [WebDriver::Element] the element to press.
4347
# @option x [integer] x co-ordinate to press on.
4448
# @option y [integer] y co-ordinate to press on.

0 commit comments

Comments
 (0)