ElementSwipe
Description
Swipe the screen in a given direction. The command will only perform the swipe within a given container.
Parameters
Name | Value | Description |
---|---|---|
Zone | * NATIVE * WEB * TEXT | 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.
info
Replace <server> with the appropriate URL.
- Public Continuous Testing Cloud - https://cloud.seetest.io/wd/hub/.
- Dedicated Continuous Testing Cloud environment - Your own domain. For example: https://company.experitest.com/wd/hub/
- On-premises Continuous Testing Cloud environment - Your designated URL. For example: https://company.com/wd/hub
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);