WaitForElement
Description
Sets sleep until element is identified.
Parameters
Name | Value | Description |
---|---|---|
Zone | String with one of the following values * NATIVE * WEB * TEXT | Zones which define the way the element will be identified. |
Element | String | Query to identify the objects/Name of the element. |
Index | Integer | Element index |
Timeout | Integer | Waiting Timeout in milliseconds. |
Usage
Command can be used to find element till a timeout. This can be useful in Web application in which element is loads after a delay.
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
WaitForElement
DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<server>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "<deviceid>");
...
...
//Waits for the Element with "id=FirstName" until 10000 milliseconds
seetest.waitForElement("WEB", "id=FirstName", 0, 10000)