From 40b4e2e9fe5284087a0690dc5eacc1ca5f0cd260 Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Wed, 22 May 2024 13:13:46 +0200 Subject: [PATCH] chore: set content test --- packages/puppeteer-core/src/cdp/Frame.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/puppeteer-core/src/cdp/Frame.ts b/packages/puppeteer-core/src/cdp/Frame.ts index 65655944112..41e0d1c8a4c 100644 --- a/packages/puppeteer-core/src/cdp/Frame.ts +++ b/packages/puppeteer-core/src/cdp/Frame.ts @@ -283,7 +283,10 @@ export class CdpFrame extends Frame { // We rely upon the fact that document.open() will reset frame lifecycle with "init" // lifecycle event. @see https://crrev.com/608658 - await this.setFrameContent(html); + await this.#client.send('Page.setDocumentContent', { + html, + frameId: this._id, + }); const watcher = new LifecycleWatcher( this._frameManager.networkManager,