Description
Use this command to press on an element while another element is not found.
Parameters
Name | Type | Description |
---|---|---|
Zone | String | Zones which define the way the element will be identified. Possible values:
|
ElementToClick | String | Element to click on when ElementToFind is not found |
ElementToClickIndex | Integer | Index of ElementToClick |
ElementToFind | String | Element to look for |
Timeout | Integer | Waiting Timeout in milliseconds |
Delay | Integer | Time to wait between rounds |
Usage
Example
In this example, while element "Expense : 4" is not found, Add is clicked.
Replace <server> with the appropriate URL.
- For hosted Continuous Testing Cloud, <server> needs to be https://cloud.seetest.io/wd/hub/.
- For a dedicated Continuous Testing Cloud environment, <server> needs to be your own domain. For example: https://company.digital.ai
PressWhileNotFound
DesiredCapabilities dc = new DesiredCapabilities(); driver = new AndroidDriver(new URL("<server>"), dc); seetest = new SeeTestClient(driver); dc.setCapability(MobileCapabilityType.UDID, "<deviceid>"); ... ... //Press until we find element with text "Expense :4" seetest.pressWhileNotFound("NATIVE", "text=Add", 0, "text=Expense :4", 0, 10000, 100);