#加载库 use Win32::IEautomation; use Win32::IEautomation::WinClicker; use Win32::IEautomation::Element; my $IE = Win32::IEautomation->new(visible =>1); #浏览网站 $IE -> gotoURL('http://130.1.1.1/sdg001.htm?ruijIE_query_ID=sdg&'); $IE -> WaitforDone(); #获取select对象,选择test1 $IE -> getSelectList("name:",'command') -> SelectItem('test1'); # IE 6 use Win32::GuiTest qw(:ALL); Gui_Set_ForegrounDWindow("Internet Explorer"); my @windows = FinDWindowlike(0,"Microsoft Internet Explorer"); SetForegrounDWindow($windows[0]); for(1..3){ SendKeys("{TAB}"); } SendKeys("{ENTER}"); SendKeys("{ENTER}"); $IE -> closeIE(); #删除IE 进程 system "taskkill /f /im IEXPLORE.EXE"; # # ## IE 8 use Win32::GuiTest qw(:ALL); Gui_Set_ForegrounDWindow("Internet Explorer"); my @windows = FinDWindowlike(0,"Microsoft Internet Explorer"); SetForegrounDWindow($windows[0]); for(1..8){ SendKeys("{TAB}"); } foreach(1..4){ SendKeys("{ENTER}"); } $IE -> closeIE(); #删除IE 进程 system "taskkill /f /im IEXPLORE.EXE";总结
以上是内存溢出为你收集整理的IEauto全部内容,希望文章能够帮你解决IEauto所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)