Puppeteer Delete Navigator.Webdriver
Try this:
const newProto = navigator.__proto__;delete newProto.webdriver;navigator.__proto__ = newProto;
Since I can't comment, I'll leave an answer:
I had the same question, and @Nodarius's answer worked for me.Since you didn't accept it, I assume your problem is still persisting.
This is probably because, even if you run in, you need that code to run before the page loads (or before the website accesses the variable).
I achieved this using a proxy (https://mitmproxy.org/) which loads the script before the page loads.
Hope it helps.
This works
await page.evaluateOnNewDocument(() => { window.navigator = {}})