【发布时间】:2012-07-01 14:08:40
【问题描述】:
我有以下代码:
$IEDocument = $IE->{Document};
$Forms = $IEDocument->all;
$form = $forms->item{'search');
$form->click;
# it clicks the search button which submits to a page
# then I do the following
$doc = $IE->{Document}; #Not sure if correct
$forms = $doc->{DocumentElement}->{InnerHTML};
$form = $forms->item('field');
$form->{value} = "12345";
# The following code must submit to a page, then put new info in an input field on that new submitted page
但它不起作用,有什么方法可以做到这一点?我研究了这么多,有人建议使用 WWW::Mechanize,但是当我使用它时,我无法截取页面,因为 Mechanize 只是在 CMD 中显示它在做什么,并没有真正打开浏览器。 (顺便说一句,有没有办法用 WWW::Mechanize 打开浏览器,看看实际发生了什么?)
【问题讨论】:
-
为什么需要截图?
-
我需要一张来自它提交到的页面的图片
标签: perl