This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
5 Replies Last post: Aug 5, 2009 11:52 AM by Ed  
Dennis Ideler Beginner 19 posts since
Feb 28, 2009
Currently Being Moderated

Mar 17, 2009 3:51 PM

How to interact with Firefox popup alert when refreshing page?

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.

Yan Estrada Beginner 1 posts since
Apr 30, 2009
Currently Being Moderated
2. Apr 30, 2009 10:05 AM in response to: Dennis Ideler
Re: How to interact with Firefox popup alert when refreshing page?

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.

David Lambert Expert 227 posts since
Sep 29, 2008
Currently Being Moderated
3. Apr 30, 2009 10:36 AM in response to: Dennis Ideler
Re: How to interact with Firefox popup alert when refreshing page?

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

gim_h Almighty 752 posts since
Oct 17, 2007
Currently Being Moderated
4. Apr 30, 2009 10:57 AM in response to: Dennis Ideler
Re: How to interact with Firefox popup alert when refreshing page?

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.

Ed Beginner 3 posts since
Jul 30, 2009
Currently Being Moderated
5. Aug 5, 2009 11:52 AM in response to: Yan Estrada
Re: How to interact with Firefox popup alert when refreshing page?

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

More Like This

  • Retrieving data ...