1

I'm new to this and I'm desperately trying to upload a video on youtube using Selenium Chrome webdriver, but when I try to login into my google account it prevents me to do so since Chrome recognizes the process is automated. The error it gives me is about the browser not being secure.

Does anybody know how to elude this issue or maybe how to open chrome already with my account signed in or any other advise?

options.AddArgument("--start-maximized");

options.AddArguments("--disable-web-security", "--disable-gpu", "--incognito", "--proxy-bypass-list=*", "--proxy-server='direct://'", "--log-level=3", "--hide-scrollbars");

//options.AddArgument("user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:46.0) Gecko/20100101 Firefox/46.0'");

IWebDriver driver = new ChromeDriver(options);

driver.Manage().Cookies.DeleteAllCookies();
driver.Manage().Window.Maximize();
//driver.Url = ("https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1&ltmpl=default&ltmplcache=2&emr=1&osid=1#identifier");
driver.Url = "https://www.google.com/";
Peter Csala
  • 17,736
  • 16
  • 35
  • 75
  • Does this answer your question? [How to open a Chrome Profile through --user-data-dir argument of Selenium](https://stackoverflow.com/questions/50635087/how-to-open-a-chrome-profile-through-user-data-dir-argument-of-selenium) – Dinac23 Sep 16 '20 at 11:38

1 Answers1

0

there is a workaround here:

  • When you first run the script

  • Go to Stackoverflow (or another web page which has google authentication) Login with you Google account

  • Go to your desired page - you are logged in your Google account

The first step you have to do it ONCE - after that in your Chrome browser you'll always be logged in into Google.

Alin Stelian
  • 861
  • 1
  • 6
  • 16