Skip to content

Commit

Permalink
fix(get-html): wait 5s before DOM snapshot (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
revolunet authored Jan 29, 2024
1 parent 28bf647 commit 59ba549
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions get-html/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const getHTML = async (url) => {
try {
const page = await browser.newPage();
await page.goto(url);
await page.waitForTimeout(5000); // wait some time, some SPA may load asynchronously (ex: angular)
const frame = await page.mainFrame();
html = await frame.content();
} catch (e) {
Expand Down

0 comments on commit 59ba549

Please sign in to comment.