Sunday, May 10, 2009

How to "Save As" a existing Script with QTP code?

We can "SaveAs" saved script in Local machine and in Quality Centre with below code.

Dim QTPApp 'As QuickTest.Application ' Declare the Application object variable
Set QTPApp = CreateObject("QuickTest.Application") ' Create the Application object
QTPApp.Launch ' Start QuickTest (if not launched)
QTPApp.Visible = True ' Make it visible
QTPApp.Open “C:\Test1”,True ' Open the test in Edit mode
QTPApp.Test.SaveAs “C:\SaveAsTest” 'Save it with a temporary name (override existing temporary test)
Set QTPApp = Nothing ' Release the Application object

No comments:

Post a Comment