I am trying to process an authentication popup in one of my new Webdriver scripts. I have a working solution for IE, but I'm struggling with Chrome. IE was as simple as following the tips on this page: How to handle a popup using Selenium WebDriver using Java . This thread does not show an excellent solution for Chrome, although some commentators note that the solution does not work for Chrome. The problem is that when you try to execute the code below in Chrome, the login popup is not a warning.
WebDriverWait wait = new WebDriverWait(driver, 10); Alert alert = wait.until(ExpectedConditions.alertIsPresent()); alert.authenticateUsing(new UserAndPassword(**username**, **password**));
This is not a Windows-level popup (), the webpage is simply password protected. I know that there are several other examples of this question in Stack Overflow, but I have not seen anything but two years. I hope there is a better solution in 2017. Thanks in advance.
source share