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

Snapshot with executeClientScripts? #1125

Open
Phyks opened this issue Dec 12, 2024 · 2 comments
Open

Snapshot with executeClientScripts? #1125

Phyks opened this issue Dec 12, 2024 · 2 comments
Assignees

Comments

@Phyks
Copy link

Phyks commented Dec 12, 2024

Hi,

When using executeClientScripts: true, it seems the saved snapshot is the full response from the server (raw HTML content, including script) and not the browser-rendered DOM. Not sure if this is intended behavior but:

1/ This snapshot is most of the time of no use since the scripts will probably not be able to be played again at a later point in time (they will no longer be available on the source/online platform, therefore it is not possible to rebuild history from such snapshots).
2/ This snapshot cannot be used either to debug parsing errors/selector errors since it does not contain the full DOM which was processed (and downloading it is not enough for a non tech-savvy user, since CORS and other security policies won't let you download external JS from a local file in absence of a webserver).

Wouldn't it be better to save the full DOM from the browser (puppeteer) as a snapshot? If for some reason (e.g. traceability) we need the initial response from the server as well, what about keeping both of them as snapshots?

Thanks

@MattiSG
Copy link
Member

MattiSG commented Dec 17, 2024

@Ndpnt can you please confirm what is saved as snapshot content when the executeClientScripts option is set to true? 🙂

@Ndpnt
Copy link
Member

Ndpnt commented Dec 18, 2024

Hi @Phyks,
I can confirm that the saved HTML is fully rendered, including any content dynamically loaded or modified by JavaScript. Could you share a concrete example?

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

No branches or pull requests

3 participants