Swipe command

Performs the swipe gesture, which is a three-part gesture:

  • A touchdown at the start coordinates
  • A move to the end coordinates
  • A touch-up at the end coordinates

The relationship between the start and end coordinates defines the direction vector of the swipe. It is possible to also define the time frame of the swipe. 

The start and end coordinate values can be in pixels or in percentage. Always use the same type for both coordinates.

The (0,0) point is in the upper left corner of the screen. The x-coordinate value increases to the right and the y-coordinate value increases to the bottom.

Parameters

Name Type Possible values Description

Device ID*

Device

 

The device for this command. By default, this is the device under test (DUT).

Start coordinates*

String

 

The start, touch-down, event coordinates.

Format: "x,y" or "x%,y%"

The coordinate value can be in pixels or in percentage of screen size (0-100). For percentage, use the % sign.

Example: 50%, 50%

Consider using the percentage value because it does not rely on the screen resolution.

End coordinates*

String

 

The end, touch up, event coordinates.

Format: "x,y" or "x%,y%"

Coordinate value can be in pixels or in percentage of screen size (0-100). For percentage, use the % sign.

Example: 50%, 50%

Consider using the percentage value because it does not rely on the screen resolution.

Duration

Number

  The duration, in seconds, for performing the operation.

Comment

String

 

Adds a comment to the script.

On-fail Result*

Condition

Ignore | Break | Continue | Abort | Catch

The behavior when the command fails.

* Mandatory parameter