1
CodePagesEncodingProvider.Instance.GetEncoding(437);
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
FirefoxProfile firefoxProfile = new FirefoxProfile(@"C:\Users\klwid\AppData\Roaming\Mozilla\Firefox\Profiles\i611dw79.selenium");
FirefoxOptions options = new FirefoxOptions() { Profile = firefoxProfile };
firefoxProfile.SetPreference("dom.webdriver.enabled", false);
firefoxProfile.SetPreference("useAutomationExtension", false);
driver = new FirefoxDriver(options);

I am trying to make selenium web driver undetectable, and I tried to change dom.webdriver.enabled to false, but when I input navigator.webdriver in firefox console it still shows true... I really don't know what I am doing wrong.

Greg Burghardt
  • 17,900
  • 9
  • 49
  • 92
D3FALT404
  • 13
  • 5
  • Does this answer your question? [How can I make a Selenium script undetectable using GeckoDriver and Firefox through Python?](https://stackoverflow.com/questions/58873022/how-can-i-make-a-selenium-script-undetectable-using-geckodriver-and-firefox-thro) – Greg Burghardt Sep 22 '21 at 15:30
  • Sadly not, because I changed preference like it is there, and it still shows `true` – D3FALT404 Sep 23 '21 at 19:18
  • The other answers and comments on that question should give you more insight. Selenium is still giving itself away, and the server is attempting to block it. This could be browser user-agent related, or a behavioral detection algorithm running on the server. I don't think a simple preference is going to work for this particular web site. – Greg Burghardt Sep 23 '21 at 19:31
  • Related: https://stackoverflow.com/questions/67323487/selenium-w-firefox-88-changes-to-navigator-webdriver – baptx Jul 19 '23 at 19:01

0 Answers0