Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98939

How to handle "Authentication required" window in Selenium?

$
0
0

I need to enter Username and Password in Authentication required window in Chrome, but it's not working due to

NoAlertPresentException

enter image description here

So my software just waiting for alert to pop-up, then getting this exception and trying again in 3 seconds and it's just looping like there is no any alert at all.

driver.SwitchTo().Alert().SetAuthenticationCredentials(User,Pass);
driver.SwitchTo().Alert().Accept();

I found similar question and the only answer was to use this method, but it's not working for me too because of DNS error, seems like I can't authenticate using this.

 driver.get(http://Username:Password@SiteURL) 

Viewing all articles
Browse latest Browse all 98939

Trending Articles