IsElementFound
Description
Check if a given element or text is found in the specified zone; if found returns TRUE if not found returns FALSE.
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. |
SearchElement | String | Element to search. |
Index | Integer | Element or text index |
Usage
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
IsElementFound
DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<server>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "<deviceid>");
...
...
//Checks if the device screen/application has the elemenent corresponding to //*[text='register']
if(seetest.isElementFound("NATIVE", "//*[text='register']", 0)){
// If statement
}