Skip to content

Properly load lazy HTML elements before taking screenshots. #1601

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dalin-
Copy link

@dalin- dalin- commented Apr 1, 2025

In the issue queue there's several suggestions about how to lazy load images. However they are all a bit lacking. They still require adding delay or postInteractionWait to wait for the images to load. To do it right we need a promise.

Here's a draft PR that does it marginally better. But images aren't the only thing that can be lazy. I haven't tested this code on lazy iframes (and the variables should be renamed to indicate that).

I'm also not a JS engineer (is it obvious). So this might be improved even more.

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.

1 participant