GetElementCountIn
Description
Count the number of elements appearances in a container.
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 Count Zone | String with one of the following values * NATIVE * WEB * TEXT | The zone to extract the text from |
Element Count | Integer | Select Element to count |
Width | Integer | Width of the search |
Height | Integer | Height of the search |
Usage
Similar command to getElementCount command which will count elements based on a container.
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
Following example we count number of buttons in the application below.
**
**
GetElementCountIn
DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<server>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "<deviceid>");
...
...
int int0 = seetest.getElementCountIn("NATIVE", "//*[@id='scrollView1']", 0, "Inside", "NATIVE", "class=android.widget.Button", 0, 0);