Skip to main content

Touch Commands

info

Note Touch commands supported in iOS only in instrumented Native zone, Android supports all zones

TouchDown

Description

Touch down on element.

Parameters

NameValueDescription
Zone* NATIVE

* WEB

* TEXT
Zones which define the way the element will be identified.
ElementElement Identifier as StringIdentification of Element in the device screen.



Identification can be XPATH or any other Appium Element Identifier
IndexElement index as IntegerIndex of Element

TouchMove

Description

Touch move to element, this command should come after touchDown or touchDownCoordinate commands.

Parameters

NameValueDescription
Zone* NATIVE

* WEB

* TEXT
Zones which define the way the element will be identified.
ElementElement Identifier as StringIdentification of Element in the device screen.



Identification can be XPATH or any other Appium Element Identifier
IndexElement indexIndex of Elemen

TouchUp

Description

Touch Up from last element/coordinate touched down or moved to.

Usage

info

Replace <server> with the appropriate URL.

Touch Commands

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

...
...

client.touchDown("NATIVE", "//*[@text=Username']", 0);
client.touchMove("NATIVE", "//*[@text='Login']", 0);
client.touchUp();