Skip to main content

VerifyIn

Description

Search for an element and verify that an element related to it exists. The direction can be UP, DOWN, LEFT or RIGHT.

Parameters

NameValueDescription
ZoneString with one of the following values



* NATIVE

* WEB

* TEXT
Zones which define the way the element will be identified.
Element SearchStringSearch Element
IndexIntegerElement index
DirectionStringDirection to analyze. The options are UP, Down, Left, Right or Inside
Element FindZoneString with one of the following values



* NATIVE

* WEB

* TEXT
Find Element Zone
ElementToFindIntegerElement to Find
WidthIntegerWidth of the search
HeightIntegerHeight of the search

Usage

Command can be used to verify an element is present in relation with another element.

info

Replace <server> with the appropriate URL.

Example

We will use the EriBank application to identify the Make Payment button using the Mortgage Request button. 

Login and navigate to the Make Payment page. Once login is successful we get following screen.

We need to find the XPATH of Make Payment and Mortgage Request. Once done command can be used. See below.

VerifyIn

DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<server>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "<deviceid>");

...
...
//Checked if MakePaymentButton is above Mortgage Request.
seetest.verifyIn("NATIVE", "accessibilityLabel=Mortgage Request", 0, "Up", "NATIVE", "accessibilityLabel=makePaymentButton", 0, 0);