Skip to content

Commit 7bee0a0

Browse files
committed
updated docs
1 parent 865c43c commit 7bee0a0

3 files changed

Lines changed: 29 additions & 4 deletions

File tree

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ dragNDrop.addAction(finger.createPointerUp(PointerInput.MouseButton.MIDDLE.asArg
4343
driver.perform(singletonList(dragNDrop));
4444
```
4545

46+
# Usage
4647

47-
# Drag and Drop test with plugin
48+
# Drag and Drop
4849
```
4950
MobileElement source = (MobileElement) new WebDriverWait(driver, 30)
5051
.until(elementToBeClickable(MobileBy.AccessibilityId("dragMe")));
@@ -55,3 +56,27 @@ driver.addCommand(HttpMethod.POST, String.format("/session/%s/plugin/actions/dra
5556
driver.getSessionId()), "dragAndDrop");
5657
driver.execute("dragAndDrop", ImmutableMap.of("sourceId", source.getId(), "destinationId", destination.getId()));
5758
```
59+
# Horizontal Swipe
60+
```
61+
MobileElement source = (MobileElement) new WebDriverWait(driver, 30)
62+
.until(elementToBeClickable(MobileBy.AccessibilityId("slider")));
63+
64+
65+
driver.addCommand(HttpMethod.POST, String.format("/session/%s/plugin/actions/swipe",
66+
driver.getSessionId()), "swipe");
67+
driver.execute("dragAndDrop", ImmutableMap.of("elementId", source.getId(), "percentage", 50));
68+
```
69+
70+
## Supported
71+
72+
* Horizontal Swipe
73+
* Drag and Drop
74+
### TODO
75+
76+
* swipe vertically
77+
* double click
78+
* longpress
79+
* zoom
80+
* multi finger swipe
81+
82+

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "appium-gestures-plugin",
3-
"version": "1.0.0",
3+
"version": "1.0.0-beta.1",
44
"description": "",
55
"main": "./lib/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)