.assert.elementsCount() Suggest edits
Checks if the number of elements specified by a selector is equal to a given value.
Usage
Example
this.demoTest = function (browser) {
browser.assert.elementsCount('div', 10);
browser.assert.not.elementsCount('div', 10);
}
Parameters
Name | Type | description |
---|---|---|
definition |
string | object | The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies element properties. |
count |
string | expected number of elements to be present. |
msg Optional |
string | Optional log message to display in the output. If missing, one is displayed by default. |