Can a website detect when you are using selenium with chromedriver?

后端 未结 19 2729
情歌与酒
情歌与酒 2020-11-21 05:41

I\'ve been testing out Selenium with Chromedriver and I noticed that some pages can detect that you\'re using Selenium even though there\'s no automation at all. Even when I

19条回答
  •  被撕碎了的回忆
    2020-11-21 06:06

    You can try to use the parameter "enable-automation"

    var options = new ChromeOptions();
    
    // hide selenium
    options.AddExcludedArguments(new List() { "enable-automation" });
    
    var driver = new ChromeDriver(ChromeDriverService.CreateDefaultService(), options);
    

    But, I want to warn that this ability was fixed in ChromeDriver 79.0.3945.16. So probably you should use older versions of chrome.

    Also, as another option, you can try using InternetExplorerDriver instead of Chrome. As for me, IE does not block at all without any hacks.

    And for more info try to take a look here:

    Selenium webdriver: Modifying navigator.webdriver flag to prevent selenium detection

    Unable to hide "Chrome is being controlled by automated software" infobar within Chrome v76

提交回复
热议问题