开发者

Saving a file with WWW::Selenium

开发者 https://www.devze.com 2023-01-07 12:13 出处:网络
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 no

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号