description |
---|
Learn how to use the I.getCount command to get the number of occurrences of a text or element in your UIlicious test. |
Get the number of occurances of a text or element
I.getCount(target)
Parameter | Type | Remarks |
---|---|---|
target | string | The text or element to find |
var count = I.getCount("Add to cart")
Sets the variable count
to the number occurances of the text "Add to cart".
var count = I.getCount(".product")
Sets the variable count
to the number occurances of the element with the CSS class "product".