Page tree
Skip to end of metadata
Go to start of metadata

Description

Press on a certain element (ElementToClick) while another element (ElementToFind) is not found


Parameters

NameValueDescription
Zone

String with one of the following values

  • NATIVE
  • WEB
  • TEXT
Zones which define the way the element will be identified.
ElementToClickStringQuery to identify the element to click
ElementToClickIndexIntegerIndex of Element
ElemenToFindStringQuery to identify the element which is looked for.
TimeoutIntegerWaiting Timeout in milliseconds
DelayIntegerThe time to wait between rounds

Usage

Set Experitest Url

Please make sure you replace <EXPERITEST_URL> with appropriate URL in the sample code below.

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



  • No labels