Driver left in inconsistent state after error: The alert disappeared before it could be closed

244 views
Skip to first unread message

Rajat Jindal

unread,
Nov 21, 2015, 3:37:41 PM11/21/15
to Selenium Developers
Hello Folks

I've reported an issue with reproducible steps here: https://github.com/SeleniumHQ/selenium/issues/1297

Basically very often the driver is left in a state where you can't run any command unless you restart the session.

Once in this inconsistent state, If you run any command, you get unhandled alert exception, and if you run command to handle alert, you get no such alert exception, which probably indicates that in some workflow, the unhandled alert exception is not reset or the modalOpen flag is not reset?

Currently the issue has been marked as won't fix. 

Given the criticality of this issue in our automation, I am requesting you to please re-consider this bug.
 
Thanks
Rajat Jindal


Titus Fortner

unread,
Nov 21, 2015, 10:34:11 PM11/21/15
to selenium-...@googlegroups.com
Anyone is welcome to take a stab at making the current firefox behavior consistent with other browsers, I just don't think it is necessary.

Firefox doesn't let you recover from an Unhandled Alert Exception because it automatically closes the Alert, preventing you from taking the required action of closing it. The solution is not to poll by taking non-alert actions and rescuing the alert present exception. but to poll for alert-actions rescuing alert not present exceptions and then handling the alert when it is there.

I gave the Ruby code for doing this in the ticket. If you need the Java code, ask in the Selenium Users mailing list or on Stack Overflow.

Titus

--
You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-developers/614463c5-034f-4264-b442-2fe23925cb58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rajat Jindal

unread,
Nov 21, 2015, 11:35:59 PM11/21/15
to Selenium Developers
Thanks Titus for spending time on trying to understand this issue on github. I look forward to hearing from you, while I keep trying workarounds on my side. (but trust me I really need help here :-( 

Just to clarify a bit more, this issue happens on same browser version (Firefox 42.0), using same selenium driver (2.48.2) but different OS (works fine on Mac OS, but fails on Cent OS 6.5). 

Thanks
Rajat Jindal

On Saturday, 21 November 2015 19:34:11 UTC-8, Titus Fortner wrote:
Anyone is welcome to take a stab at making the current firefox behavior consistent with other browsers, I just don't think it is necessary.

Firefox doesn't let you recover from an Unhandled Alert Exception because it automatically closes the Alert, preventing you from taking the required action of closing it. The solution is not to poll by taking non-alert actions and rescuing the alert present exception. but to poll for alert-actions rescuing alert not present exceptions and then handling the alert when it is there.

I gave the Ruby code for doing this in the ticket. If you need the Java code, ask in the Selenium Users mailing list or on Stack Overflow.

Titus
On Sat, Nov 21, 2015 at 2:37 PM, Rajat Jindal <rajatj...@gmail.com> wrote:
Hello Folks

I've reported an issue with reproducible steps here: https://github.com/SeleniumHQ/selenium/issues/1297

Basically very often the driver is left in a state where you can't run any command unless you restart the session.

Once in this inconsistent state, If you run any command, you get unhandled alert exception, and if you run command to handle alert, you get no such alert exception, which probably indicates that in some workflow, the unhandled alert exception is not reset or the modalOpen flag is not reset?

Currently the issue has been marked as won't fix. 

Given the criticality of this issue in our automation, I am requesting you to please re-consider this bug.
 
Thanks
Rajat Jindal


--
You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-developers+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages