Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
execute tests using VB Script
#1
Not Solved
Hi All,

I am new to QTP. I was doing a sample for executing test from another test(VB scripting) in QTP. Below is the code snippet

Code:
set qtApp1 = CreateObject("QuickTest.Application")
If Not qtApp1.Launched then
qtApp1.Launch
end if
qtApp1.Visible = True '
qtApp1.Options.Run.RunMode = "Fast"
qtApp1.Options.Run.ViewResults = True

qtApp1.Open "D:\Test2"

set qtTest = qtApp1.Test
qtTest.Run
qtTest.Close
qtApp1.Quit

I am getting a runtime error while executing the above code. It kicks me out at qtApp1.Open "D:\Test2" saying "The operation failed because the application is busy"

Could you please let me know what could be the reason for this type of error
Reply
#2
Not Solved
Try the below code after killing all instances of QTPro.exe in task manager>processes

Code:
set qtApp1 = CreateObject("QuickTest.Application")
If Not qtApp1.Launched then
qtApp1.Launch
end if
qtApp1.Visible = True '
qtApp1.Options.Run.RunMode = "Fast"
qtApp1.Options.Run.ViewResults = True
qtApp1.Open "D:\Test2"
qtApp1.Test.Run
qtApp1.Quit
set qtApp1=Nothing
Reply
#3
Not Solved
Thanks Rajpes!

If i kill the QTPro process then the current QTP application that runs this script also dies. I tried killing QT automation agent but of no use. Also one thing I forgot to mention that I am currently connected to a remote machine and using QTP application there. The scripts are also in the same remote machine. Not sure if this has any impact
Reply
#4
Not Solved
No idea,try restarting that remote machine
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Execute button of putton won't be clicke automaticly in UFT (VB) MarUFT 3 2,443 11-21-2016, 04:22 PM
Last Post: Ankur
  [UFT] Fixed web tests with dynamic parts jdd 3 2,439 04-05-2016, 02:56 PM
Last Post: vinod123
  Not able to execute script shanthalaAR 0 1,934 06-27-2015, 03:53 AM
Last Post: shanthalaAR
  How to Execute a testset from QC using OTA framework AutomationTester2011 12 51,498 01-21-2015, 09:22 PM
Last Post: karthik_sanakran
  Is there a possible way to execute sql in QTP using 'WITH' clause shruthic 0 2,985 04-26-2014, 11:42 PM
Last Post: shruthic

Forum Jump:


Users browsing this thread: 1 Guest(s)