Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

497 puppeteer before closing wait for the request to finish while testing html examples #565

Conversation

valentinMachado
Copy link
Contributor

@valentinMachado valentinMachado commented Mar 16, 2023

This PR instead of waiting an hardcoded duration after opening the page ensure that:

  • All images in the page have loaded
  • All Iframes in the page have loaded
  • There were not XHR pending for 500ms

EDIT: not ready yet billboard iframe is not working (was working locally) Iam investigating that

@valentinMachado
Copy link
Contributor Author

I am giving up on this...

I tried when page.goto to wainUntil networkidle0 but it's appears that when a page is rendering an animated element like a canvas this event is never triggered.

So instead I tried with the flag waitUntil domDocumentload but I have to define myself when all request have been done, like ones which can be embeded inside an iframe which I did not resolve with the PendingXHR package not catching these pending xhr.

So for now we could let the CI just connect to the page and wait a certain amount of time like it's done

@valentinMachado valentinMachado deleted the 497-puppeteer-before-closing-wait-for-the-request-to-finish-while-testing-html-examples branch March 17, 2023 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Puppeteer: before closing, wait for the request to finish while testing html examples.
1 participant