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

Feature: option to disable navigator.webdriver == true ? #1680

Closed
hheexx opened this issue Jan 28, 2020 · 7 comments
Closed

Feature: option to disable navigator.webdriver == true ? #1680

hheexx opened this issue Jan 28, 2020 · 7 comments

Comments

@hheexx
Copy link

hheexx commented Jan 28, 2020

Is there any plan to support flag that disables navigator.webdriver property that screams to sites that they are run in selenium?

Chrome has similar flag (disable-automation)

@whimboo
Copy link
Collaborator

whimboo commented Feb 3, 2020

I cannot find that Chrome has such an option. Can you please point to the documentation?

@hheexx
Copy link
Author

hheexx commented Feb 3, 2020

Sure.
https://stackoverflow.com/a/57304986/2406518

I think you should also add disable-automation or similarly named parameter that controls all modifications you do to webdriver controlled browser compared to vanilla.

@whimboo
Copy link
Collaborator

whimboo commented Feb 3, 2020

This page doesn't list any disable-automation flag, and also doesn't say anything about navigator.webdriver.

@hheexx
Copy link
Author

hheexx commented Feb 3, 2020

I'm looking now, I read it wrong. Here https://stackoverflow.com/a/56635123/2406518
I didn't saw it's no longer possible from version 79.

Anyway, it still disables all other modifications. I need to have environment as close as possible to vanilla browser.

There is no disable-automation flag, they exclude enable-automation flag but the result is the same.

I can modify navigator.webdriver with a extension. Can you add switch that disables all other changes that are not required?

@whimboo
Copy link
Collaborator

whimboo commented Feb 3, 2020

Ok, so Chrome doesn't allow this also. And that is because the WebDriver spec defines that property on the Navigator object, which has to be set to true when tests are running with webdriver enabled:

https://w3c.github.io/webdriver/#interface

Implementations have to be conformant to this requirement. As such we will not provide a way to circumvent that.

@ep0x
Copy link

ep0x commented Mar 21, 2020

Options.AddArgument("--disable-blink-features=AutomationControlled");
Try this

@ScamCast
Copy link

ScamCast commented Mar 21, 2020

@ep0x that's for Chrome only. As far as I know, Firefox doesn't have any options to do it.

I had commented the same thing above, but they deleted it for some reason.

@mozilla mozilla locked as resolved and limited conversation to collaborators Mar 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants