Skip to content

Commit d8f4848

Browse files
Implement New Action Keyword Flick (#370)
* Implement New Action Keyword `Flick` * Revise the location of the flick keyword * Update Documentation
1 parent 8df7c2a commit d8f4848

File tree

2 files changed

+94
-245
lines changed

2 files changed

+94
-245
lines changed

AppiumLibrary/keywords/_touch.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,17 @@ def drag_and_drop(self):
192192
"""TO BE IMPLEMENTED
193193
Refer to : appium.webdriver.extensions.action_helpers"""
194194

195-
def flick(self):
196-
"""TO BE IMPLEMENTED
197-
Refer to : appium.webdriver.extensions.action_helpers"""
195+
def flick(self, start_x:int, start_y:int, end_x:int, end_y:int):
196+
"""Flick from one point to another point.
197+
198+
Args:
199+
- ``start_x`` - x-coordinate at which to start
200+
- ``start_y`` - y-coordinate at which to start
201+
- ``end_x`` - x-coordinate at which to stop
202+
- ``end_y`` - y-coordinate at which to stop
203+
204+
Usage:
205+
| Flick | 100 | 100 | 100 | 400 | # Flicks the screen up. |
206+
"""
207+
driver = self._current_application()
208+
driver.flick(start_x, start_y, end_x, end_y)

docs/AppiumLibrary.html

Lines changed: 80 additions & 242 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)