当前位置: 动力学知识库 > 问答 > 编程问答 >

vbscript - How do we reference an already opened instance of quick test?

问题描述:

How do we reference an already opened instance of quick test application (QTP) for e.g we will use Set monDocument = GetObject("c:\report.doc") to refer an already opened MS Word file saved in c:\report.doc?

网友答案:

Just create the QTP automation object

Set qtApp = CreateObject("QuickTest.Application") 

If it's already open you'll get the existing instance, otherwise you will have to launch it.

If  Not qtApp.launched Then 
    qtApp.Launch 
End If 

Code stolen from here.

分享给朋友:
您可能感兴趣的文章:
随机阅读: