Skip to main content

PressWhileNotFound

Description​

Use this command to press on an element while another element is not found.

Parameters​

NameTypeDescription
ZoneStringZones which define the way the element will be identified.



Possible values:



* NATIVE

* WEB

* TEXT
ElementToClickStringElement to click on when ElementToFind is not found
ElementToClickIndexIntegerIndex of ElementToClick
ElementToFindStringElement to look for
TimeoutIntegerWaiting Timeout in milliseconds
DelayIntegerTime to wait between rounds

Usage​

Example​

In this example, while element "Expense : 4" is not found, Add is clicked.

**

**

info

Replace <server> with the appropriate URL.

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);