简体   繁体   English

Perl:浏览网站,填写表格并启动浏览器(不提交)

[英]Perl: Navigate a website, fill up form and launch browser (without submitting)

I am looking for perl code to go to a website, navigate through a couple of links, fill up a form and then submit it. 我正在寻找访问网站的perl代码,通过几个链接导航,填写表格,然后提交。 However, I want to launch the page with the filled up form in IE so that I can see exactly what's being submitted (and do a sanity check, perhaps change a couple of words) before actually submitting it. 但是,我想用IE中的填写好的表单启动页面,以便在实际提交之前可以准确地查看正在提交的内容(并进行完整性检查,也许更改几个单词)。

I realize mechanize can be used to create the form and submit it automatically - but I'm stuck on how to "launch the filled up form webpage in a browser" part. 我意识到可以使用机械化来创建表单并自动提交它-但我仍坚持如何“在浏览器中启动填写好的表单网页”部分。 Any help would be much appreciated. 任何帮助将非常感激。

Thanks. 谢谢。

You can try to use Win32::OLE to launch IE: Controlling Internet Explorer Using Win32::OLE . 您可以尝试使用Win32::OLE启动IE: 使用Win32 :: OLE控制Internet Explorer

WWW::Mechanize::Firefox should be able to do that in Firefox, but you'll need to install mozrepl extension. WWW::Mechanize::Firefox mozrepl WWW::Mechanize::Firefox应该可以在Firefox中做到这一点,但是您需要安装mozrepl扩展名。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM