Swipe
Description
Swipe the screen in a given direction.
Parameters
Name | Type | Description |
---|---|---|
Direction | String | Direction of the swipe motion. * Right * Left |
Offset | Integer | Swipe offset |
Time | Integer | Swipe overall time |
Usage
Command can be used to swipe in a given direction from an offset.
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
swipe
DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<server>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "<deviceid>");
...
...
// Swipes right from an offset
seetest.swipe("Right", 10, 500);
iOS 15 and Above
In some cases the swipe operation might require you to use SetDragStartDelay first.
For example:
- Opening control-center on devices with home button via swipe down.
- Opening app-switcher on devices without home button via swipe down.
swipe
//Command to delay in drag.
seetest.setDragStartDelay(50);
// Swipes down from an offset
seetest.swipe("Down", 0, 2000);