ElementSwipeWhileNotFound
Description
Swipe inside a component to search for an element or text.
Parameters
Name | Value | Description |
---|---|---|
Zone | String as valid zones * NATIVE * WEB * TEXT | 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 * NATIVE * WEB * TEXT | 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
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
ElementSwipeWhileNotFound
DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<server>"), 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
}