The QuickTest
Automation Object Model provides objects, methods, and properties that enable
you to control QuickTest from another application.
For example –
1. We can open QTP with the
help of vb script.
2. We can run QTP tests
without opening QTP manually. By vbscript, we can invoke QTP and define the
testes which need to be executed.
3. We can set iterations for
the execution of the test script and can also pass parameters.
e.g.
How this can be done? How VBscript controls QTP?
QTP provides an interface (object
model), through which we can automate QTP itself by vbscript. By this we can
automate tasks like – Run and configure QTP, Run scripts etc.
See below examples – Run QTP
– Copy the below code and pate in notepad, same file as “ABC.vbs”.
'Create the application object
Set qtApp = CreateObject("QuickTest.Application")
'Start QuickTest
qtApp.Launch
Now Run the “ABC.vbs”, It will open QTP.Note: Make sure u have close QTP Instance
No comments :
Post a Comment