SeeTestAutomation - ElementGetTableRowsCount
Please note that this tool is classified as a Legacy tool. We recommend transitioning to our updated solutions to maintain optimal performance and security in your workflows. For more information on this matter, please reach out to technical support .
ElementGetTableRowsCount(Zone, TableLocator, TableIndex, Visible)
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.
Note: This command will work only on instrumented applications. for more information see Preparing Applications For Testing
Parameters
- 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 SeeTestAutomation’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.
Usage
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.
Code Examples
Java Example
int int3 = client.elementGetTableRowsCount("NATIVE", "xpath=//*[@class='UITableView']", 0, true);
C# Example Expand source
int int3 = client.ElementGetTableRowsCount("NATIVE", "xpath=//*[@class='UITableView']", 0, true);
VBScript Example Expand source
int7 = client.ElementGetTableRowsCount ( "NATIVE", "xpath=//*[@class='UITableView']", 0, true )
Report
Python Example Expand source
var3 = self.client.elementGetTableRowsCount("NATIVE", "xpath=//*[@class='UITableView']", 0, True)
Perl Example Expand source
my $int3 = $client->elementGetTableRowsCount("NATIVE", "xpath=//*[\@class='UITableView']", 0, 1);