0

I need to get past a Google login form using Selenium but am unable to do so. Following advice I've seen elsewhere, I've tried making the chrome driver launch with an existing chrome profile which is already logged in to Google:

options.addArguments("user-data-dir=/Users/myuser/Library/Application Support/Google/Chrome/");
options.addArguments("profile-directory=Profile 3");

This works insofar as the correct chrome profile is opened, but as soon as selenium navigates to the desired website the Google login form pops up. If I close Selenium and open the same website with the same chrome profile in a regular browser, the browser remembers me and I am able to go straight through without being prompted to login. Am I doing something wrong or has Google fixed this workaround? (I am using Mac).

William
  • 145
  • 1
  • 5
  • could you tell us what's the website? – NictheDEV Oct 19 '21 at 13:14
  • @NictheDEV it's a private test environment to which access is limited to certain Google accounts. The problem is that Google does not allow automated software like Selenium to login via their forms, hence I am trying to use a chrome profile which is already logged in. Problem is described here: https://stackoverflow.com/questions/60117232/selenium-google-login-block – William Oct 19 '21 at 13:34

0 Answers0