qns_fengyusong 发表于 2017-5-4 10:18:11

Python cPAMIE【模拟IE浏览器】

  #import other modules
import cPAMIE
import cModalPopUp

ie = cPAMIE.PAMIE()
ie.navigate('http://10.232.27.6:9080/fbrole/main/login.jsp')
#print ie.cookieGet()
ie.textBoxSet('EOSOperator/userID','fengyong')
ie.textBoxSet('hciPasswordTypeEOSOperator/password','000000')

ie.buttonClick('login')
ie.navigate('http://10.232.27.6:9080/fbrole/main/default.pr_automata.forward.do?nextPage=/pkgriskmng/pagebondcredit/bondcredit_top.jsp')

ie.textBoxSet('DAMS_ImpawnType/certTypeID','111')
ie.textBoxSet('BOND','111')
time.sleep(1);
ie.buttonClick('search')
  功能:登陆页面给文本框赋值并查询。
  PAMIE 完成模拟浏览器的行为。
  PAMIE 对javascript支持太差 只能调用没有参数的方法。
  PAMIE 对Frame的执行不够 并且提供的几个方法【frameGet,frameGetValue,framesGetValue,frameExists】也不可使用。不能导航到frame的子页面。
  PAMIE可以完成一些任务,但用来做测试框架不是很理想。
页: [1]
查看完整版本: Python cPAMIE【模拟IE浏览器】