int getElementCountIn(zoneName, elementSearch, index, direction, elementCountZone, elementCount, width, height)
|
|
|
|
|
|
|
Count the number of elements appearances in a container.
Zone: Select Zone of container
Element Search: Select the Element container
Index: Element index
Direction: Direction to analyze. The options are UP, Down, Left, Right or Inside
Element Count Zone: The zone to extract the text from
Element Count: Select Element to count
Width: Width of the search ("0" indicates until the end/start of the window)
Height: Height of the search ("0" indicates until the end/start of the window
Similar command to getElementCount command which will count elements based on a container.
Scenario: In the following example we will count the number of buttons on the EriBank home screen.
Parameters:
Zone: set to be NATIVE
Element Search: set to be xpath=//*[@id='scrollView1']
Index: set to be 0
Direction: set to be Inside
Element Count Zone: set to be NATIVE
Element Count: set to be class=android.widget.Button
Width: set to be 0
Height: set to be 0
Result: Upon execution of this command, we will be able to see the count as 4.
int int0 = client.getElementCountIn("NATIVE", "xpath=//*[@id='scrollView1']", 0, "Inside", "NATIVE", "class=android.widget.Button", 0, 0);int int0 = client.GetElementCountIn("NATIVE", "xpath=//*[@id='scrollView1']", 0, "Inside", "NATIVE", "class=android.widget.Button", 0, 0);int0 = client.GetElementCountIn ( "NATIVE", "xpath=//*[@id='scrollView1']", 0, "Inside", "NATIVE", "class=android.widget.Button", 0, 0 )Reportvar0 = self.client.getElementCountIn("NATIVE", "xpath=//*[@id='scrollView1']", 0, "Inside", "NATIVE", "class=android.widget.Button", 0, 0)my $int0 = $client->getElementCountIn("NATIVE", "xpath=//*[\@id='scrollView1']", 0, "Inside", "NATIVE", "class=android.widget.Button", 0, 0);