Page tree
Skip to end of metadata
Go to start of metadata

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 SearchStringSearch Element
IndexIntegerElement index
DirectionStringDirection to analyze. The options are UPDownLeftRight or Inside
Element Count Zone

String with one of the following values

  • NATIVE
  • WEB
  • TEXT
The zone to extract the text from
Element CountIntegerSelect Element to count
WidthInteger

Width of the search

HeightIntegerHeight of the search

Usage

Similar command to getElementCount command which will count elements based on a container.

Set Experitest Url

Please make sure you replace <EXPERITEST_URL> with appropriate URL in the code snippet below.

Example

Following example we count number of buttons in the application below.


GetElementCountIn
DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<EXPERITEST_URL>"), 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);



  • No labels