Description
Swipe the screen in a given direction. The command will only perform the swipe within a given container.
Parameters
Name | Value | Description |
---|---|---|
Zone |
| Zones which define the way the element will be identified. |
Element | Element Identifier as String | Identification of Element in the device screen. Identification can be XPath or any other Appium Element Identifier. |
Index | Integer | Index of Element |
Direction | String | Direction to swipe |
Offset | Integer | Swipe offset |
Time | Integer | Swipe overall time (milliseconds) |
Usage
Equivalent command to the swipe command. This command will swipe inside a container and not the entire screen.
Set Experitest Url
Please make sure you replace <EXPERITEST_URL> with appropriate URL in the sample code below.
- For SeeTest cloud, EXPERITEST_URL needs to be https://cloud.seetest.io/wd/hub/
- For Dedicated Experitest Lab, EXPERITEST_URL needs to be your own domain. e.g - https://company.experitest.com
Example
In this example swipe down is attempted in element "id=brown_menu"
ElementSwipe
DesiredCapabilities dc = new DesiredCapabilities(); driver = new AndroidDriver(new URL("<EXPERITEST_URL>"), dc); seetest = new SeeTestClient(driver); dc.setCapability(MobileCapabilityType.UDID, "deviceid"); ... ... // Swipes down seetest.elementSwipe("NATIVE", "id=browse_menu", 0, "Down", 500, 1000);