ElementGetTableRowsCount(Zond, TableLocator, TableIndex, Visible)
|
|
|
|
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.
Zone - Select the Zone in which the table is stored. If you set the value of the Zone to "default" or to some user-defined Zone name, the row numbers can be extracted from a table stored in Silk Mobile’s repository.
TableLocator - Locator of the table class element
TableIndex - Index in case of multiple tables on the screen
Visible - Boolean parameter. Set true to return the number of visible rows only, or false to return the total number of rows including ones that are not visible.
Scenario: In the following example we will extract the number of rows in the main menu table of the UIcatalog application.
Parameters:
TableLocator - Table class locator - will be set to xpath=//*[@class='UITableView']
TableIndex - Table index - will be set to 0
Visible - Boolean parameter
Command Results:
With Visible set to True - the command will return 12, which is the number of rows visible on the screen.
With Visible set to False - the command will return 14, since there are 2 more rows that are not visible and will only show after a scroll down.
int int3 = client.elementGetTableRowsCount("NATIVE", "xpath=//*[@class='UITableView']", 0, true);int int3 = client.ElementGetTableRowsCount("NATIVE", "xpath=//*[@class='UITableView']", 0, true);int7 = client.ElementGetTableRowsCount ( "NATIVE", "xpath=//*[@class='UITableView']", 0, true )Reportvar3 = self.client.elementGetTableRowsCount("NATIVE", "xpath=//*[@class='UITableView']", 0, True)my $int3 = $client->elementGetTableRowsCount("NATIVE", "xpath=//*[\@class='UITableView']", 0, 1);