Skip to main content

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

NameValueDescription
ZoneString with one of the following values



* NATIVE

* WEB

* TEXT
Zones which define the way the element will be identified.
SearchElementStringElement to search.
IndexIntegerElement or text index

Usage

info

Replace <server> with the appropriate URL.

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
}