I'm trying to open a intranet website with Selenium which redirects to another link for login and gets back to original URL on valid login. For example - When I start webdriver and navigate to original site URL https://DemoOriginalWebsite.Com
the browser gets redirected to https://Validateyourselfbeforeaccessing.com:9030
and shows below popup window to enter user id and password.
I tried to pass credentials as below but didn't work.
Try 1 : http://username:pswd@DemoOriginalWebsite.Com
Try 2 : https://username:pswdValidateyourselfbeforeaccessing.com:9030
The authentication URL can't be accessed directly.
My actual code:
IWebDriver chromeDriver;
ChromeOptions options = new ChromeOptions();
options.AddArgument("disable-infobars");
options.AddUserProfilePreference("credentials_enable_service", false);
options.AddUserProfilePreference("profile.password_manager_enabled", false);
chromeDriver = new ChromeDriver(options);
chromeDriver.Manage().Window.Maximize(); chromeDriver.Navigate().GoToUrl(@"http://username:pswd@DemoOriginalWebsite.Com");
Any suggestions please.