Skip to content

Commit

Permalink
Document percentage parameter in swipe action (#163)
Browse files Browse the repository at this point in the history
* Create APIRef.ActionsOnElement.md

* Added examples without optional parameters for SwipeAction
  • Loading branch information
yedidyak authored and rotemmiz committed Jun 11, 2017
1 parent 01d7609 commit 192e9b4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docs/APIRef.ActionsOnElement.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,14 @@ await element(by.id('scrollView')).scrollTo('bottom');
await element(by.id('scrollView')).scrollTo('top');
```

### `swipe(direction, speed)`
### `swipe(direction, speed, percentage)`

direction - left/right/up/down<br>
speed - fast/slow
speed - fast/slow - default is fast
percentage - (optional) screen percentage to swipe as float

```js
await element(by.id('scrollView')).swipe('down');
await element(by.id('scrollView')).swipe('down', 'fast');
await element(by.id('scrollView')).swipe('down', 'fast', 0.5);
```

0 comments on commit 192e9b4

Please sign in to comment.