How to interact with Firefox popup alert when refreshing page?

331 views
Skip to first unread message

Dennis Ideler

unread,
Mar 17, 2009, 4:51:16 PM3/17/09
to selenium-users...@googlegroups.com
Hi everyone,

When I try to refresh a page, a confirmation popup appears about the postdata.
It's the popup that says
{quote}To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier.{quote}

And then you have to option to "Resend" or "Cancel".

I want to have Selenium automate it clicking on "Resend" otherwise my test is stuck there.
Does anyone have an idea of how I can do this?

P.S. My test is written in Java, so if you can show an example written in Java, that would be appreciated.

Dennis Ideler

unread,
Mar 18, 2009, 9:47:05 AM3/18/09
to selenium-users...@googlegroups.com
Is this even possible to do?
I just found this:

h2. What you can't do with Selenium
h3. I can't interact with a popup dialog. My test stops in its tracks!
You can, but only if the dialog is an alert or confirmation dialog. Other special dialogs can't be dismissed by javascript, and thus currently cannot be interacted with. These include the "Save File", "Remember this Password" (Firefox), and modal (IE) dialogs. When they appear, Selenium can only wring its hands in despair.
To solve this issue, you may use a workaround (if one exists); otherwise you may have to exclude the test from your automated corpus. For the "Save File" dialog in Firefox, a custom template may be specified when running via the RC that will always cause the file to be downloaded to a specified location, without querying the user (see [http://forums.openqa.org/thread.jspa?messageID=31350]). The "Remember this Password" dialog should not appear again after you've chosen to remember it. Currently there is not much that can be done about IE modal dialogs.


Can anyone confirm this for my situation? And does anyone know a workaround?

Reply all
Reply to author
Forward
0 new messages