We're updating the issue view to help you get more done. 

The dismissal of "confirm" dialogs opened while inside an iframe throws a WebDriverException in Firefox

Description

In Firefox, when clicking on a button inside an iframe which opens a confirmation dialog with Opt.AcceptModalDialog() specified, the dialog is not dismissed (accepted or canceled) and one of the following exceptions is thrown:

Reproducible:

This seems to be caused by the following code in SeleniumWebDriver.AcceptModalDialog:

The synchronization causes a call to SeleniumWindowManager containing a Firefox workaround:

Catching the exception using a try/catch block in the code above does not work, as the alert is dismissed when the UnhandledAlertException is thrown. Also, the context does not switch to the outermost frame.

An overload to SeleniumWindowManager.SwitchToWindow could be introduced in Coypu, which only synchronizes the window without making sure that the DefaultContent is in scope (not performing the Firefox workaround). This method should then somehow be called by SeleniumWebDriver.AcceptModalDialog & SeleniumWebDriver.CancelModalDialog.

Details TBD.

Assignee

Marcel Holle

Reporter

Marcel Holle

Labels

None

Time tracking

5h

Components

Affects versions

Priority

Normal
Configure