can't set webdriver
See original GitHub issuemy environment:
- Puppeteer version: 5.5.0
- Platform / OS version: win10 x64
- URLs (if applicable):
- Node.js version: v14.15.0
What steps will reproduce the problem?
let browser = await puppeteer.launch({
ignoreDefaultArgs: ['--enable-automation']
});
let page = (await browser.pages())[0];
await page .evaluateOnNewDocument(() => {
Object.defineProperty(window.navigator, 'webdriver', {
get: () => false,
});
});
await this.currentPage.goto('https://www.baidu.com');
When I execute the above code, I get the following error
VM50:6 Uncaught TypeError: Cannot redefine property: webdriver
at Function.defineProperty (<anonymous>)
at <anonymous>:6:28
at <anonymous>:10:19
(anonymous) @ VM50:6
(anonymous) @ VM50:10
I don’t know what caused it
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:10
Top Results From Across the Web
chrome Webdriver can't be resolved to a type error eclipse ...
chrome Webdriver can't be resolved to a type error eclipse and java:- ... Right click on Project>Buildpath>configure build path ...
Read more >How to solve "Webdriver cannot be resolved to a type" Error in ...
In this video it shows how one can resolve the " Webdriver cannot be resolved to a type" error while working with selenium...
Read more >Fixing Selenium WebDriver Executable Path Error - Baeldung
1. Overview ... In this tutorial, we'll take a look at the common Selenium error: “The path to the driver executable must be...
Read more >Install browser drivers - Selenium
Through WebDriver, Selenium supports all major browsers on the market such as Chrome/Chromium, Firefox, Internet Explorer, Edge, and Safari.
Read more >Chrome doesn't start or crashes immediately - ChromeDriver
While it is possible to work around this issue by passing '--no-sandbox' flag when creating your WebDriver session, such a configuration is unsupported...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

You can try to add argument
--disable-blink-features=AutomationControlledwhen launch the browser:It works to me
same to me, chrome version 88.0.4324.96