Saving a file with WWW::Selenium
Im trying to do开发者_C百科wnload 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!
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.
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
精彩评论