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
| Zones which define the way the element will be identified. |
SearchElement | String | Element to search. |
Index | Integer | Element or text index |
Usage
Set Experitest Url
Please make sure you replace <EXPERITEST_URL> with appropriate URL in the code snippet below.
- For SeeTest cloud, EXPERITEST_URL needs to be https://cloud.seetest.io:443/wd/hub
- For Dedicated Experitest Lab, EXPERITEST_URL needs to be your own domain. e.g - https://company.experitest.com
Example
IsElementFound
DesiredCapabilities dc = new DesiredCapabilities(); driver = new AndroidDriver(new URL("<EXPERITEST_URL>"), 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 }