Skip to main content

Drag Coordinates

Description

Use this command to perform the drag action based on start coordinates (X,Y) and end coordinates (X,Y) on the device reflection.

Parameters

NameTypeDescription
X1 CoordinateIntegerX coordinate starting point to start the drag
Y1 CoordinateIntegerY coordinate starting point to start the drag
X2 CoordinateIntegerX coordinate starting point to end the drag
Y2 CoordinateIntegerY coordinate starting point to end the drag
TimeIntegerTime in milliseconds for the command to be executed

Usage

info

Replace <server> with the appropriate URL.

Example

Drag Action

DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<server>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "<deviceid>");

...
...
// Command to Drag Action
client.dragCoordinates(636, 826, 572, 1166, 2000);