Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 782 Bytes

count-number-of-page-elements.md

File metadata and controls

35 lines (23 loc) · 782 Bytes
description
Learn how to use the I.getCount command to get the number of occurrences of a text or element in your UIlicious test.

I.getCount

Get the number of occurances of a text or element

Usage

I.getCount(target)

Parameters

Parameter Type Remarks
target string The text or element to find

Example(s)

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".