MCPcopy
hub / github.com/codeceptjs/CodeceptJS / seeNumberOfElements

Method seeNumberOfElements

lib/helper/Puppeteer.js:1855–1858  ·  view source on GitHub ↗

* {{> seeNumberOfElements }} *

(locator, num)

Source from the content-addressed store, hash-verified

1853 *
1854 */
1855 async seeNumberOfElements(locator, num) {
1856 const elements = await this._locate(locator)
1857 return equals(`expected number of elements (${new Locator(locator)}) is ${num}, but found ${elements.length}`).assert(elements.length, num)
1858 }
1859
1860 /**
1861 * {{> seeNumberOfVisibleElements }}

Calls 3

_locateMethod · 0.95
equalsFunction · 0.90
assertMethod · 0.80

Tested by

no test coverage detected