Saturday, December 29, 2012

How to schedule a QTP Test

In this video i explained about how to schedule a QTP Test.

Covered an overview of AOM(Automation Object Model).
How to schedule a task in Win XP and Win 7 machine.



Here is the AOM Code for launching QTP and running a QTP Test.

sFilePath="E:\Test1"
Set qtApp = CreateObject("QuickTest.Application") 'creates an instance of QTP Object

qtApp.Launch ' Launches QTP
qtApp.Visible = True 'Making QTP Visible during execution

qtApp.open sFilePath, True 'Opens the QTP Test

set qtTest=qtApp.Test

qtTest.Run   'Runs the QTP Test

WScript.sleep 10000

qtTest.close 'Closes the QTP Test
qtApp.quit  'Closes QTP

set qtTest=nothing
set qtApp=nothing

No comments:

Post a Comment