Skip to content

Commit a3ba034

Browse files
authored
be able to change kind for w3c touch action (#70)
1 parent 8d2fabf commit a3ba034

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file.
33

44
## [Unreleased]
55
### Enhancements
6+
- Be able to change `kind` in W3C touch action.
7+
- Read: https://github.com/appium/ruby_lib_core/blob/master/lib/appium_lib_core/common/base/bridge/w3c.rb#L29
68

79
### Bug fixes
810

lib/appium_lib_core/common/base/bridge/w3c.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ def commands(command)
2626
# element = @driver.find_element(:id, "some id")
2727
# @driver.action.click(element).perform # The `click` is a part of `PointerActions`
2828
#
29-
def action(async = false)
29+
# # You can change the kind as the below.
30+
# @driver.action(kind: :mouse).click(element).perform # The `click` is a part of `PointerActions`
31+
def action(async: false, kind: :touch)
3032
::Selenium::WebDriver::W3CActionBuilder.new self,
31-
::Selenium::WebDriver::Interactions.pointer(:touch, name: 'touch'),
33+
::Selenium::WebDriver::Interactions.pointer(kind, name: kind.to_s),
3234
::Selenium::WebDriver::Interactions.key('keyboard'),
3335
async
3436
end

0 commit comments

Comments
 (0)