Skip to main content

ElementSwipe

Description

Swipe the screen in a given direction. The command will only perform the swipe within a given container.

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.
IndexIntegerIndex of Element
DirectionStringDirection to swipe
OffsetIntegerSwipe offset
TimeIntegerSwipe overall time (milliseconds)

Usage

Equivalent command to the swipe command. This command will swipe inside a container and not the entire screen.

info

Replace <server> with the appropriate URL.

Example

In this example swipe down is attempted in element "id=brown_menu"

ElementSwipe

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

...
...
// Swipes down
seetest.elementSwipe("NATIVE", "id=browse_menu", 0, "Down", 500, 1000);