File tree 4 files changed +20
-3
lines changed
lib/appium_lib_core/common/base
4 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
3
3
4
4
## [ Unreleased]
5
5
### Enhancements
6
+ - override default duration to make some action fast [ #36 ] ( https://github.com/appium/ruby_lib_core/pull/36 )
6
7
7
8
### Bug fixes
8
9
Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ module Appium
2
2
module Core
3
3
class Base
4
4
class CoreBridgeW3C < ::Selenium ::WebDriver ::Remote ::W3C ::Bridge
5
+ # Used for default duration of each touch actions
6
+ # Override from 250 milliseconds to 50 milliseconds
7
+ ::Selenium ::WebDriver ::PointerActions ::DEFAULT_MOVE_DURATION = 0.05
8
+
5
9
def commands ( command )
6
10
::Appium ::Core ::Commands ::COMMANDS_EXTEND_W3C [ command ]
7
11
end
Original file line number Diff line number Diff line change @@ -18,13 +18,25 @@ def teardown
18
18
end
19
19
20
20
def test_tap
21
- skip if @@driver . dialect
21
+ skip if @@driver . dialect == :oss
22
22
23
23
el = @@core . wait { @@driver . find_element ( :accessibility_id , 'Views' ) }
24
24
@@driver . action . click ( el ) . perform
25
25
26
26
el = @@core . wait { @@driver . find_element ( :accessibility_id , 'Custom' ) }
27
- @@driver . action . click_and_hold ( el ) . move_to_location ( 0 , 700 ) . release . perform
27
+ # same as @@driver.action.click_and_hold(el).move_to_location(0, 700).release.perform
28
+ @@driver . action
29
+ . move_to ( el ) . pointer_down ( :left )
30
+ . move_to_location ( 0 , 700 )
31
+ . release
32
+ . perform
33
+
34
+ # Scroll a bit without elements
35
+ @@driver . action
36
+ . move_to_location ( 500 , 500 ) . pointer_down ( :left )
37
+ . move_to_location ( 0 , 700 )
38
+ . release
39
+ . perform
28
40
29
41
el = @@core . wait { @@driver . find_element ( :accessibility_id , 'ImageButton' ) }
30
42
assert_equal 'ImageButton' , el . name
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ def teardown
15
15
end
16
16
17
17
def test_tap
18
- skip if @@driver . dialect
18
+ skip if @@driver . dialect == :oss
19
19
20
20
el = @@core . wait { @@driver . find_element ( :accessibility_id , 'Buttons' ) }
21
21
@@driver . action . click ( el ) . perform
You can’t perform that action at this time.
0 commit comments