how to avoid google search detect selenium webdriver as unusual behaviour? how to avoid google search detect selenium webdriver as unusual behaviour? selenium selenium

how to avoid google search detect selenium webdriver as unusual behaviour?


It appear that google detect browser profile to determine something strange has going on or not. for example if you do private browsing with your browser(i test it with firefox and chrome), your browser profile will change to anonymous, so google will find it suspicious and request you to fill captcha.

That case also happen when you run your browser from selenium webdriver.

So you need to set the selenium driver profile to your default profile by using some code like this(currently only work on firefox)

ProfilesIni allProfiles = new ProfilesIni();WebDriver driver = new FirefoxDriver(allProfiles.getProfile("default"));


I disagree with @Angga and doubt that Google knows that you're a bot because you're NOT in your default profile.

It's more likely because of this:Can a website detect when you are using selenium with chromedriver?


Just add a single line, it will surely help

#For ChromeDriver version 79.0.3945.16 or overoptions.add_argument('--disable-blink-features=AutomationControlled') #Open Browserbrowser = webdriver.Chrome(executable_path='chromedriver.exe',options=option)