Description
Press on a certain element (ElementToClick) while another element (ElementToFind) is not found
Parameters
Name | Value | Description |
---|---|---|
Zone | String with one of the following values
| Zones which define the way the element will be identified. |
ElementToClick | String | Query to identify the element to click |
ElementToClickIndex | Integer | Index of Element |
ElemenToFind | String | Query to identify the element which is looked for. |
Timeout | Integer | Waiting Timeout in milliseconds |
Delay | Integer | The time to wait between rounds |
Usage
Set Experitest Url
Please make sure you replace <EXPERITEST_URL> with appropriate URL in the sample code below.
- For SeeTest cloud, EXPERITEST_URL needs to be https://cloud.seetest.io/wd/hub/
- For Dedicated Experitest Lab, EXPERITEST_URL needs to be your own domain. e.g - https://company.experitest.com
Example
In this example till the element with text "Expense : 4" is not found Expenses will be added by pressing element with the text "Add".
PressWhileNotFound
DesiredCapabilities dc = new DesiredCapabilities(); driver = new AndroidDriver(new URL("<EXPERITEST_URL>"), dc); seetest = new SeeTestClient(driver); dc.setCapability(MobileCapabilityType.UDID, "deviceid"); ... ... //Press till we fule element with text "Expense :4" seetest.pressWhileNotFound("NATIVE", "text=Add", 0, "text=Expense :4", 0, 10000, 100);