加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

IEauto

发布时间:2020-12-15 20:52:59 所属栏目:大数据 来源:网络整理
导读:? ?? ? #加载库? ???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

?

 
 
  1. ??
  2. ?
  3. #加载库?
  4. ???use?Win32::IEAutomation;?
  5. ???use?Win32::IEAutomation::WinClicker;?
  6. ???use?Win32::IEAutomation::Element;?
  7. ???my?$ie?=?Win32::IEAutomation->new(visible?=>1);?
  8. #浏览网站?
  9. ???$ie?->?gotoURL('http://130.1.1.1/sdg001.htm?ruijie_query_id=sdg&');?
  10. ???$ie?->?WaitforDone();?
  11. #获取select对象,选择test1?
  12. ???$ie?->?getSelectList("name:",'command')?->?SelectItem('test1');?
  13. ??
  14. ??
  15. #?IE?6?
  16. ??use?Win32::GuiTest?qw(:ALL);?
  17. ???Gui_Set_ForegroundWindow("Internet?Explorer");?
  18. ???my?@windows?=?FindWindowLike(0,"Microsoft?Internet?Explorer");?
  19. ???SetForegroundWindow($windows[0]);?
  20. ???for(1..3){?
  21. ??????SendKeys("{TAB}");?
  22. ???}?
  23. ???SendKeys("{ENTER}");?
  24. ???SendKeys("{ENTER}");?
  25. ???$ie?->?closeIE();?
  26. ???#删除ie?进程?
  27. ????system?"taskkill?/f?/im?IEXPLORE.EXE";?
  28. #?#??
  29. ##?IE?8?
  30. use?Win32::GuiTest?qw(:ALL);?
  31. ???Gui_Set_ForegroundWindow("Internet?Explorer");?
  32. ???my?@windows?=?FindWindowLike(0,"Microsoft?Internet?Explorer");?
  33. ???SetForegroundWindow($windows[0]);?
  34. ???for(1..8){?
  35. ??????SendKeys("{TAB}");?
  36. ???}?
  37. foreach(1..4){?
  38. ???SendKeys("{ENTER}");?
  39. }?
  40. ????
  41. ??
  42. ???$ie?->?closeIE();?
  43. ???#删除ie?进程?
  44. ????system?"taskkill?/f?/im?IEXPLORE.EXE";?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读