navigator.webdriver cannot modify
See original GitHub issueSteps to reproduce
Tell us about your environment:
- Puppeteer version: 1.9.0
- Platform / OS version: macOS High Sierra
- URLs (if applicable):
- Node.js version: 10.0.0
What steps will reproduce the problem?
Please include code that reproduces the issue.
1.create a new page
const page = await browser.newPage()
2.modify navigator webfriver value
const modifyWebdriver = () => {
Object.defineProperty(navigator, 'webdriver', {
get: function() {
return false
},
})
}
await page.evaluate(modifyWebdriver)
3.console .log(navigator.webdriver)
console.log(await page.evaluate('navigator.webdriver')) // false
4.goto a website
await page.goto('https://www.google.com', {
waitUntil: 'networkidle2',
timeout: 3000000,
})
5.console.log(navigator.webdrive)
console.log(await page.evaluate('navigator.webdriver')) // true
What is the expected result? console.log(await page.evaluate(‘navigator.webdriver’)) // false
What happens instead? console.log(await page.evaluate(‘navigator.webdriver’)) // true
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Selenium webdriver: Modifying navigator.webdriver flag to ...
First the update 1. execute_cdp_cmd() : With the availability of execute_cdp_cmd(cmd, cmd_args) command now you can easily execute ...
Read more >Modifying navigator.webdriver flag to prevent selenium detection
I'm trying to automate a very basic task in a website using selenium and chrome but somehow the website detects when chrome is...
Read more >Navigator.webdriver - Web APIs | MDN
Navigator.webdriver. The webdriver read-only property of the navigator interface indicates whether the user agent is controlled by automation.
Read more >Make `navigator.webdriver === false` when automation is not ...
Currently, `navigator.webdriver === undefined` when automation is not enabled. In other browsers, it's `false` (and this matches the spec).
Read more >Avoid bot detection not working with Selenium - Edureka
Hi, thank you for your answer. · All you have to do is open binary(chromedriver.exe) in hex editor, change string starting with $cdc...
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 FreeTop 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
Top GitHub Comments
Simpler approch: const browser = await puppeteer.launch({ignoreDefaultArgs: [“–enable-automation”]});