Question: Does anyone out there know how to secure the UserName and Password?
Thanks
Tom
tomdar...@gmail.com
unread,
Jul 6, 2022, 8:15:24 AM7/6/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Selenium Users
I tried this code and it errored out with error = "No such Alert"
_chromeOptions = new ChromeOptions(); _chromeOptions.AddArgument("--incognito"); ChromeDriver driver = new ChromeDriver(_chromeOptions); //opens Chrome driver.Navigate().GoToUrl("http://myInternalWindowsAuthURL");
driver.SwitchTo().Alert(); //code errors out here with error = "No Such Alert" driver.FindElement(By.Id("UserName")).SendKeys(username); driver.FindElement(By.Id("Password")).SendKeys(password); driver.SwitchTo().Alert().Accept(); driver.SwitchTo().DefaultContent();
joseph...@gmail.com
unread,
Jul 6, 2022, 6:30:27 PM7/6/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Selenium Users
The fact that adding username:password@URL is working for you means that whatever is causing that login popup to appear is using Basic Authentication. If that's coming from your IIS Web site, it's already configured for Basic Authentication and is using it.
Jim Evans, the main Selenium developer for C# code, wrote a series of blog posts about how to handle many types of authentication (and why they work this way). You can find the first post, with links to all of the other posts, here: