|
PAMIE是一套为Python写的用于Web自动化测试的工具,采用Win32COM的方式操作IE来实现。原理比较简单,但是可以真实再现用户的使用,QA用非常合适:)
Required Packages
The following packages must be installed before installing PAMIE.
1.Python 2.4
2.Mark Hammond's win32all package for Python
3.Ctypes package for Python
Recommended Packages
These packages are optional, but they are deemed worthy by the PAMIE developers.
ActivePython distribution package for Python, which also includes the win32all package.
Stani's Python Editor if you are looking for a Python editor.
现面是偶自己写的简单的GOOGLE搜索代码:
from cPAMIE import PAMIE
ie = PAMIE()
ie.navigate("google.com")
ie.textBoxSet('q','python')
ie.buttonClick('btnG')
ie.linkClick('Python Programming Language -- Official Website')
ie.windowChange('Python Programming Language -- Official Website')
ie.windowFind('Python Programming Language -- Official Website')
ie.textBoxSet('q',"Automation")
ie.buttonClick('submit') |
|