Hi everyone,
When I try to refresh a page, a confirmation popup appears about the postdata.
It's the popup that says
To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier.
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.
Is this even possible to do?
I just found this:
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?
We are experiencing the same problem. There are a couple of "work arounds" in the forum using robots.java but I don't think this will help if you need to do any processing on the modal dialog window, like trying to identify different buttons and clicking them.
If I am wrong or someone knows a good work around please let us know.
Hello Dennis
It is early days yet as I have only just started looking at it but Autoit claims to be able to do the things you want. There are references to using it in java but I haven't tied down the configuration yet, maybe if you look at it you might be able to get started on it, I don't have time at the moment.
Best regards
David Lambert
you can turn the popup off by changing Browser.sessionstore.postdata (http://kb.mozillazine.org/Browser.sessionstore.postdata) to 1 in firefox user profile.
so you have to create an user pofile for seleniumwith the seeting. http://kb.mozillazine.org/Profile_folder http://kb.mozillazine.org/Creating_a_new_Firefox_profile_on_Windows
and then start selenium server with -firefoxProfileTemplate option.
BTW, you can alos open an issue on http://jiar.openqa.org. developers could have better solution.
I am having the same problem. I tried using java robots but it does not work, after getting the confirmation window the test just hangs there and nothing happens, so the java commands for hitting enter are not executed ![]()
