我有以下代码:
$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 打开浏览器,看看实际发生了什么?)