There are some old solutions to resolve this question, the one is in github, the other is in stackoverflow.
puppeteer
has _client
property in lower version.
The solution in lower vision as follows:
page._client.send('Network.setBypassServiceWorker', {bypass: true})
The puppeteer version is 18.0.5
, so the Page
has not _client
property.
So the same solution in higher vison as follows:
const client = await page.target().createCDPSession();
await client.send("Network.setBypassServiceWorker", { bypass: true });
But it not working. So how to resolve this problem?