Skip to content

Commit c1a4b8e

Browse files
committed
add timeout to dynamic_script waitForFunction
1 parent 9fce224 commit c1a4b8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

puppeteer/dynamic_scripts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ await page.goto(baseURL + '/dynamic_scripts/index.html');;
3232
await page.waitForFunction(() => {
3333
const products = document.querySelector('#product');
3434
return products.textContent.length > 0;
35-
});
35+
}, {timeout: 1000});
3636

3737
const product = await page.evaluate(() => { return document.querySelector('#product').textContent; });
3838
if (product !== 'Keemun') {

0 commit comments

Comments
 (0)