QTP_Python 运行QTP
来源:互联网 发布:java程序员兼职群 编辑:程序博客网 时间:2024/05/20 19:32
import win32com, win32com.client
qtp = win32com.client.Dispatch("QuickTest.Application")
# starts up QTP
qtp.Launch()
# make the QTP window visible
qtp.Visible = True
# Open a test, replace the path
qtp.Open("C:\\Test\\testFlight")
# to open a QTP test in Quality Center
# qtp.Open(r"[QualityCenter] Subject\FolderName\QTPScript")
# create a RunResultsOptions object
qtResultsOpt = win32com.client.Dispatch("QuickTest.RunResultsOptions")
# set the location to where the results will be save
qtResultsOpt.ResultsLocation = "C:\\Test\\testFlight\\Res1"
qtp.Test.Run(qtResultsOpt)
print "Test has %s" %qtp.Test.LastRunResults.Status
# close the Test
qtp.Test.Close()
# quit QTP
qtp.Quit()
qtp = win32com.client.Dispatch("QuickTest.Application")
# starts up QTP
qtp.Launch()
# make the QTP window visible
qtp.Visible = True
# Open a test, replace the path
qtp.Open("C:\\Test\\testFlight")
# to open a QTP test in Quality Center
# qtp.Open(r"[QualityCenter] Subject\FolderName\QTPScript")
# create a RunResultsOptions object
qtResultsOpt = win32com.client.Dispatch("QuickTest.RunResultsOptions")
# set the location to where the results will be save
qtResultsOpt.ResultsLocation = "C:\\Test\\testFlight\\Res1"
qtp.Test.Run(qtResultsOpt)
print "Test has %s" %qtp.Test.LastRunResults.Status
# close the Test
qtp.Test.Close()
# quit QTP
qtp.Quit()
- QTP_Python 运行QTP
- Loadrunner运行QTP脚本
- Loadrunner运行QTP脚本
- qtp的运行原理
- 【QTP】最小化QTP运行的方法
- 远程安装QTP和远程运行QTP
- MonkeyRunner_用QTP运行monkeyrunner
- 外部数据源驱动QTP运行
- QTP 运行外部程序执行 QTP->tools -> options - Run
- 【QTP】AOM-用vbs文件启动QTP并运行脚本
- 用Schedule定时运行QTP脚本
- 让QTP脚本自动运行起来
- 【转载】QTP常见运行错误问题解答
- QTP中判断Action运行是否超时
- QTP无法保存和运行的解决方法
- 打开QTP之后,IE运行打不开
- 使用QTP时无法运行IE
- VBS启动QTP并自动运行BAT
- map的用法与详解
- Windows编程革命简史
- vim配置详解
- Web Frameworks for Python
- android中的布局文件
- QTP_Python 运行QTP
- ios 真机调试(证书下载)
- System.Windows.Forms.Timer与System.Timers.Timer的区别
- 单例模式
- 面试之感想一
- Android 解析json数据格式
- Android Gallery 3D效果(有图有真相)
- 深入分析MFC文档视图结构(项目实践)
- 强制客户端更新Silverlight XAP文件方法汇总