I.getCount

Get the number of occurances of a text or element

Usage

I.getCount(target)
Parameter Type Remarks
target string The text or element to find

Returns: The number of occurences of a text or element found.

# Count text

var count = I.getCount("Success")

Sets the variable count to the number occurances of the text "Success".

Ignores casing and white-spaces. This behavior is not configurable at the moment.

# Count element using CSS / XPATH

var count = I.getCount(".product")

Sets the variable count to the number occurances of the element with the CSS class "product".