As explained in earlier posts, a .vbs file can be used to perfrom any operation on Windows like, handling a Windows application or working on a browser or running a UFT script.
Function runTestOnUFT()
set qtApp = CreateObject("QuickTest.Application")
qtApp.Launch
qtApp.Visible =True
qtApp.Open <projectPath>
Set qtTest = qtApp.Test
qtTest.Run
qtTest.Save
qtTest.Close
qtApp.quit
End Function
To invoke and run a particular test on UFT, from an External vbs file:-
- Copy the below function in a notepad and save the file with .vbs extension.
- To run the program, double click the saved .vbs file.
Function runTestOnUFT()
set qtApp = CreateObject("QuickTest.Application")
qtApp.Launch
qtApp.Visible =True
qtApp.Open <projectPath>
Set qtTest = qtApp.Test
qtTest.Run
qtTest.Save
qtTest.Close
qtApp.quit
End Function
====================*************************************====================
No comments:
Post a Comment