Skip to main content

ElementGetTableRowsCount

Description

This command allows you to extract the numbers of one or more rows of a given table, whether the table is entirely visible on the screen or not.

info

This command only works on instrumented applications.

Parameters

NameValueDescription
ZoneString with one of the following values



* NATIVE

* WEB

* TEXT
Zone in which the table is stored
TableLocatorStringLocator of the table class element
TableIndexIntegerIndex in case of multiple tables on the screen
VisbileBooleanIf True, return the number of visible rows only.



If False, return the total number of rows including ones that are not visible.

Usage

info

Replace <server> with the appropriate URL.

Example

In the following example, number of rows of UICatalog application is extracted.

ElementGetTableRowsCount

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

...
...
// Gets the number of rows.
int int3 = client.elementGetTableRowsCount("NATIVE", "xpath=//*[@class='UITableView']", 0, true);