QTP/UFT – Running your Scripts at Scheduled Time with ease!

1. Open QTP/UFT and create a new test

2. Copy and paste MsgBox "Hello, you auto launched your first test!" in your script

3. Save the Test as "AutoLaunch" just on your C: Drive and then close out UFT.

4. Open the windows notepad and copy paste the code below:

Set App = CreateObject("QuickTest.Application")
App.Visible = True
App.WindowState = "Maximized"' Maximize the QuickTest window
App.ActivateView "ExpertView"' Display the Expert View
App.open "C:\AutoLaunch", False

I saved my script on my C drive so my app path is "C:\AutoLaunch". Make sure that this is where you saved your script as well.

5. Save this notepad file as AutoLaunch.vbs on your C: drive as well.

6. Click on windows and search for "Task Scheduler" on the windows search bar. Once you see it, open it.

7. Under Actions, click "Create Basic Task"

8. Type the name UFT Launch Script

9. Click Next

10. Select One Time radio button

11. Select the time 2 minutes from right now so you can test it.

12. Make sure "Start a program" is selected and click Next

13. Click Browse and select the AutoLaunch.vbs file in your C drive that we created

14. Click Finish. Your task is not displayed in your task schedule.

Now wait for a minute or so and watch your script launch! Pretty cool right? Paste comments and questions below!!

Pin It on Pinterest

Clef two-factor authentication