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

前端 未结 10 1076
既然无缘
既然无缘 2020-11-22 00:57

I\'m trying to automate a very basic task in a website using selenium and chrome but somehow the website detects when chrome is driven by selenium and blocks every request.

10条回答
  •  生来不讨喜
    2020-11-22 01:24

    As mentioned in the above comment - https://stackoverflow.com/a/60403652/2923098 the following option totally worked for me (in Java)-

    ChromeOptions options = new ChromeOptions();
    options.addArguments("--incognito", "--disable-blink-features=AutomationControlled");
    

提交回复
热议问题