@@ -47,7 +47,7 @@ def swipe(self, start_x, start_y, offset_x, offset_y, duration=1000):
47
47
driver = self ._current_application ()
48
48
driver .swipe (start_x , start_y , offset_x , offset_y , duration )
49
49
50
- def swipe_by_percent (self , start_x , start_y , end_x , end_y ):
50
+ def swipe_by_percent (self , start_x , start_y , end_x , end_y , duration = 1000 ):
51
51
"""
52
52
Swipe from one percent of the screen to another percent, for an optional duration.
53
53
Normal swipe fails to scale for different screen resolutions, this can be avoided using percent.
@@ -77,9 +77,9 @@ def swipe_by_percent(self, start_x, start_y, end_x, end_y):
77
77
y_offset = y_end - y_start
78
78
platform = self ._get_platform ()
79
79
if platform == 'android' :
80
- self .swipe (x_start , y_start , x_end , y_end )
80
+ self .swipe (x_start , y_start , x_end , y_end , duration )
81
81
else :
82
- self .swipe (x_start , y_start , x_offset , y_offset )
82
+ self .swipe (x_start , y_start , x_offset , y_offset , duration )
83
83
84
84
def scroll (self , start_locator , end_locator ):
85
85
"""
0 commit comments