今天,写了个脚本,自动调出IE浏览器,自动填写控件信息,自动提交网页,使用到了包Win32::IEAutomation,下面是自动登录校内网的示例
#!/usr/bin/perl
use Win32::IEAutomation;
my $ie = Win32::IEAutomation->new(visible => 1,maximize => 1);
$ie->gotoURL("");
$ie->getTextBox('name:','email')->SetValue('11111111qq.com');
$ie->getTextBox('id:','password')->SetValue("mimamima");
$ie->getButton('caption:','登录')->Click();
#$ie->closeIE();
阅读(1681) | 评论(0) | 转发(0) |