Skip to content

Commit

Permalink
docs: Add Javascript examples for clickGesture and flingGesture (appi…
Browse files Browse the repository at this point in the history
…um#820)

* docs: Add Javascript examples for clickGesture and flingGesture

* fix: Change indentation and add framework name

* fix: Change JS example framework from Mocha to wdio
  • Loading branch information
dopudj authored Aug 27, 2024
1 parent 76eef86 commit 6a73f1d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/android-mobile-gestures.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ driver.executeScript("mobile: clickGesture", ImmutableMap.of(
driver.execute_script('mobile: clickGesture', {'x': 100, 'y': 100})
```

```javascript
// Javascript - @wdio
await driver.executeScript('mobile: clickGesture', [{x: 100, y: 100}]);
```

### mobile: dragGesture

Expand Down Expand Up @@ -172,6 +176,15 @@ boolean canScrollMore = (Boolean) ((JavascriptExecutor) driver).executeScript("m
));
```

```javascript
// Javascript - @wdio
await driver.executeScript('mobile: flingGesture', [{
elementId: element.elementId,
direction: 'right',
speed: 500,
}]);
```


### mobile: pinchOpenGesture

Expand Down

0 comments on commit 6a73f1d

Please sign in to comment.