I am working on the test automation that uses WebDriver (Selenium 2) and Java. The AUT is web-based application. A modal dialog pops up that requires user authentication before the user can access the Web app's login page.
I have searched extensively and am unable to get any working solution.
Relevant Search results
The following thread addresses how to handle alerts and prompts:
The following blog post attempts to address a few related issues:
But neither of them provides an implemented solution to the problem.
When driver.get("login page") is executed, the browser attempts to open the page, but a modal dialog appears which asks for the user authentication (login & pwd). The WebDriver keeps waiting until I manually authenticate or click Cancel.
The execution never goes to the next step. So whatever I attempt after "driver.get()" is never executed until manual intervention.
Note: I am using Firefox 4
EDIT: The blocker to all the solutions is to the following - (from WebDriver's get() method's documentation: This is done using an HTTP GET operation, and the method will block until the load is complete for driver.get(). Due to this block, the control of execution never goes to the next step i.e. Any statement written after the driver.get() will not get executed until load is complete.