Skip to content

Instantly share code, notes, and snippets.

Created Sep 11, 2020
What would you like to do?
Playwright - Use Mocha to verify number of elements
const visibleBooksSelector = 'li:not(.ui-screen-hidden)'
const visibleBooks = await page.$$(visibleBooksSelector)
assert.equal(visibleBooks.length, 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment