There can be situations when you need to schedule your QTP scripts so that they can run when you are not present in front of your PC.
1) Create a .vbs file to launch QTP with required settings, add-ins etc.
Here is a sample vbs code
Set App = CreateObject("QuickTest.Application")
App.Launch
App.Visible = True
App.WindowState = "Maximized" ' Maximize the QuickTest window
App.ActivateView "ExpertView" ' Display the Expert View
App.open "C:\Program Files\Mercury Interactive\QuickTest Professional\Tests\Test1", False 'Opens the test in editable mode
2) ok, for the first timers. Create a sample QTP test and save it as Test1 at the location above. Copy the code into notepad and name the file as testing.vbs
3) Now we will automate the opening of vbs file through Windows Scheduler. Go To Start > Control Panel > Schedule Tasks > Click Add Schedule Tasks Click Next on the screen.
4) Click Browse and and select the .vbs file you just created.
5) Give a name to the task and select the frequency for performing the given tasks
6) Select Start Time and Start Date.
7) Next Screen Enter "UserName", "Password" and "Confirm Password" Click Next
8) Click on finish
-->
1) Create a .vbs file to launch QTP with required settings, add-ins etc.
Here is a sample vbs code
Set App = CreateObject("QuickTest.Application")
App.Launch
App.Visible = True
App.WindowState = "Maximized" ' Maximize the QuickTest window
App.ActivateView "ExpertView" ' Display the Expert View
App.open "C:\Program Files\Mercury Interactive\QuickTest Professional\Tests\Test1", False 'Opens the test in editable mode
2) ok, for the first timers. Create a sample QTP test and save it as Test1 at the location above. Copy the code into notepad and name the file as testing.vbs
3) Now we will automate the opening of vbs file through Windows Scheduler. Go To Start > Control Panel > Schedule Tasks > Click Add Schedule Tasks Click Next on the screen.
4) Click Browse and and select the .vbs file you just created.
5) Give a name to the task and select the frequency for performing the given tasks
6) Select Start Time and Start Date.
7) Next Screen Enter "UserName", "Password" and "Confirm Password" Click Next
8) Click on finish
-->
No comments:
Post a Comment