IsFoundIn
Description
Search for an element and check if 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 * NATIVE * WEB * TEXT | 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 Find Zone | String with one of the following values * NATIVE * WEB * TEXT | 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 find and Element using an other element.
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
In the following example, we will try to find the ‘Make Payment’ button using the ‘Mortgage Request’ button.
We need to find the XPATH of Make Payment and Mortgage Request.
IsFoundIn
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.isFoundIn("NATIVE", "accessibilityLabel=Mortgage Request", 0, "Up", "NATIVE", "accessibilityLabel=makePaymentButton", 0, 0);