So I have a page that I need to test with selenium, it recently has been changed to use alert popup authentication (If you don't know what I'm talking about then check this.
My current approach is pretty much 3. approach from the link above, but I use Actions to send keys instead of just finding elements.
browser.get(url)
Alert alert = browser.switchTo().alert();
Actions action = new Actions(browser)
action.sendkeys(user).sendkeys(Keys.tab).sendkeys(password).perform()
alert.accept()
the problem starts right at the first line, it gets stuck there... Seems like selenium/chromedriver doesn't detect that page is loaded and it can proceed to next line.
I know this for sure because when I try to print something after first line, it never get printed and eventually (an eternity later) it throws me TimeOutException.
Any suggestions?
Using latest: Selenium 3.11.0 ChromeDriver 2.38 Google Chrome 66