-
-
Save angiejones/87deb80d49c7dacbaf31e1fe5e4be25a to your computer and use it in GitHub Desktop.
Playwright - accessing children nodes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('should return one book when exact title is given', async () => { | |
await page.fill('#searchBar', 'Agile Testing') | |
await page.waitForSelector('li.ui-screen-hidden', { state: 'attached' }) | |
const visibleBooksSelector = 'li:not(.ui-screen-hidden)' | |
const visibleBooks = await page.$$(visibleBooksSelector) | |
assert.equal(visibleBooks.length, 1) | |
assert.equal(await page.innerText(visibleBooksSelector + ' >> h2'), 'Agile Testing') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment