diff --git a/test/web/puppeteer.mjs b/test/web/puppeteer.mjs index ccedf654406572f6f8d0900c5c399143cd0e843a..5013612208484c377d5b4b34a24e5371fb86d009 100644 --- a/test/web/puppeteer.mjs +++ b/test/web/puppeteer.mjs @@ -35,16 +35,21 @@ if (!config.browser) { waitUntil: 'load', timeout: 0 }); + const page = await browser.newPage(); const fileUrl = 'file://' + config.path; + + console.log('Loading page... '+fileUrl); + await page.goto(fileUrl); - console.log('Running tests...'); + const title = await page.title(); + console.log('Page title:', title); - const searchResultSelector = '#mocha-done'; - await page.waitForSelector(searchResultSelector); + + console.log('Running tests...'); await page.waitForFunction('document.getElementById("mocha-done").textContent.length > 0'); const passes = await page.evaluate(() => document.getElementById('mocha-stats').querySelector('li.passes').textContent);