Description
Swipe inside a component to search for an element or text.
Parameters
Name | Value | Description |
---|---|---|
Zone | String as valid zones
| Zones which define the way the element will be identified. |
SearchElement | String | The container element identifier |
Direction | String | Direction to swipe |
Offset | Integer | Swipe Offset |
Swipe Time | Integer | Time for the swipe action |
Element to find Zone | String as valid zones
| Zone of the sought element |
Element to find | String | The sought element identifier |
Element to Find Index | Integer | The sought element’s index (i.e., the number of times the element appears after the first appearance minus two). |
Delay | Integer | Time to wait before sending a command (in milliseconds) |
Rounds | Integer | Maximum swipe rounds |
Click | Boolean | Click the found element if TRUE |
Usage
Command could be used to scroll down till element is not found
Set Experitest Url
Please make sure you replace <EXPERITEST_URL> with appropriate URL in the code snippet below.
- For SeeTest cloud, EXPERITEST_URL needs to be https://cloud.seetest.io:443/wd/hub
- For Dedicated Experitest Lab, EXPERITEST_URL needs to be your own domain. e.g - https://company.experitest.com
Example
ElementSwipeWhileNotFound
DesiredCapabilities dc = new DesiredCapabilities(); driver = new AndroidDriver(new URL("<EXPERITEST_URL>"), dc); seetest = new SeeTestClient(driver); dc.setCapability(MobileCapabilityType.UDID, "<deviceid>"); ... ... if(seetest .elementSwipeWhileNotFound("NATIVE", "id=nav_drawer", "Down", 0, 2000, "NATIVE", "text=History", 0, 1000, 5, true)){ // If statement }