Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

navigator.webdriver should be undefined instead of false #21

Open
LPology opened this issue Mar 23, 2019 · 0 comments
Open

navigator.webdriver should be undefined instead of false #21

LPology opened this issue Mar 23, 2019 · 0 comments

Comments

@LPology
Copy link

LPology commented Mar 23, 2019

Should the webdriver fix be set to undefined instead of false?

navigator.webdriver returns true in headless chrome, but in normal browsing it doesn't return false. It is undefined in the browser.

It seems like setting it to false is actually a tip off that headless mode is being concealed, because it isn't false in a normal browser.

This seems to work:

  await page.evaluateOnNewDocument(() => {
    Object.defineProperty(navigator, 'webdriver', {
      get: () => undefined,
    });
  });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant