wait till page has loaded

This commit is contained in:
Matt Charlton 2019-11-27 11:43:41 +00:00
parent 1cfcf108f0
commit 919d2a0c93

View File

@ -2,9 +2,11 @@ const PercyScript = require('@percy/script')
PercyScript.run(async (page, percySnapshot) => {
await page.goto('http://localhost:8000')
await page.waitFor('#categories')
await page.waitFor('#categories').then(() => {
const categories = document.querySelectorAll('#categories li')
console.log(categories)
})