.tap(options)
Performs tap gesture on element.
Usage
element(matcher).tap(options)
Parameters
options(Object?):options.x(Number?): x offset from left of element. Defaults to center point.options.y(Number?): y offset from top of element. Defaults to center point.
Returns
Element: A new element to avoid mutation and allow function chaining.
Support
| Platform | Supported |
|---|---|
| iOS | Yes |
| Android | Yes |
| Web | Partial |
Examples
Perform tap gesture at element center point:
const { element, by } = require("appdriver");
(async () => {
await element(by.label("button"))
.tap();
})();
Perform tap gesture at (0, 50), relative to the element location:
const { element, by } = require("appdriver");
(async () => {
await element(by.label("button"))
.tap({ y: 50 });
})();
Known Issues
optionsare not supported within the Web context.