views:

44

answers:

2

Im trying to download a file with perl's WWW::Selenium. I get a popup box asking me if I want to save/open the file. I want to manipulate it and say 'save' at some given location. Im not sure how this can be done. Please help.

P.S: I could not use WWW::Mechanize for this page and I have to use Selenium

Thanks a lot!

A: 

My understanding is that with selenium 1.x it can't be done, and has yet to be implemented in selenium 2 yet.

See,

http://www.jsystemtest.org/?q=node/70

and

http://wiki.openqa.org/display/SEL/Selenium+Core+FAQ#SeleniumCoreFAQ-Ican%27tinteractwithapopupdialog.Myteststopsinitstracks%21

ascarb
No, but if he tells us which OS he's using he might be able to use WWW::Selenium along with another module to control the app's dialog boxes.
Weegee
Right, sorry. should have wrote, "with just selenium ... can't be done".
ascarb
+1  A: 

Selenium cannot handle the save box but a third party utility, AutoIt, can. What we do is have our testing code use selenium commands to click the download link, and then execute a compiled AutoIt script to save the file to the disk.

Zugwalt
Thanks Zugwalt!! I thought my problem could not be solved in selenium 1. Will try this out...