Endpoint

Overview

Moves one finger across the screen: by a direction (from the middle of the screen, over distance of it), by a direction from a target (text, a detected element, an item id or a point, as Tap takes it: the finger starts at its center), or from one point from to another to. count repeats the swipe, with gapMs between swipes: {"direction": "up", "count": 3} moves a feed three items on. up moves the finger up, so a feed goes to the next item; down goes back. Points are [x, y] fractions 0 to 1 of the screen, or {x, y} in screen pixels. The swipe is played as a Touch path. Requires an active session on each phone. Platforms: Android, iPhone.

Request Body

string[]
required
The phones to swipe on.
string
One phone, instead of phoneIds. The answer’s data is then that phone’s result itself, not a list, and a failure on the phone is the request’s ok: false with the phone’s error (at the HTTP status of its code). Give phoneId or phoneIds, not both.
string
up, down, left or right. Give a direction, or from and to.
object
With direction: start the swipe at the center of this, found on the screen as it is now, as Tap finds its target: {text}, {label}, {element, from} or {x, y}. The finger moves distance of the screen from there, and stops at the screen’s edge. {"target": {"text": "Trending"}, "direction": "left"} moves that row. Nothing matching is target_not_found, as for Tap.
number
default:"0.6"
With direction: how far the finger moves, as a fraction of the screen (more than 0, at most 1), centered on the middle of the screen, or from the target.
number[] | object
Where the finger starts: [x, y] fractions of the screen, or {x, y} in screen pixels.
number[] | object
Where the finger lifts, in the same form as from.
number
default:"300"
How long one swipe takes, from 50 to 5000 milliseconds.
number
default:"1"
How many times to swipe, from 1 to 50. All the swipes and their gaps together can take at most 100 seconds.
number
default:"1500"
The pause between two swipes, from 0 to 10000 milliseconds.
object
Look at the screen after the action, in the same answer. The hub takes a frame before the action, does it, waits until the screen settles (two frames about 300 ms apart that look the same, for at most settleMs), and adds screen, effect and, when the action should have changed the screen and did not, warnings to the phone’s result. Costs one look at the screen plus the wait.

Response

boolean
true when the request was carried out. Check each result for how it went on that phone.
Result[]
One Result per phone, in the order of phoneIds.