Description
Search for an element and verify that an element related to it exists. The direction can be UP, DOWN, LEFT or RIGHT.
Parameters
Name | Value | Description |
---|---|---|
Zone | String with one of the following values
| Zones which define the way the element will be identified. |
Element Search | String | Search Element |
Index | Integer | Element index |
Direction | String | Direction to analyze. The options are UP, Down, Left, Right or Inside |
Element FindZone | String with one of the following values
| Find Element Zone |
ElementToFind | Integer | Element to Find |
Width | Integer | Width of the search |
Height | Integer | Height of the search |
Usage
Command can be used to verify an element is present in relation with another element.
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
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("<EXPERITEST_URL>"), 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);