Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP launch error
#1
Not Solved Sad 
Hi
Am not able to launch QTP using the script as after runing the below mentioned code through a vbs file, QTP appears for a flash of a second and then it disappears.

CODE ::
---------------------------------------------------------------
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
---------------------------------------------------------------

qtp process exists in the "Processes" tab of the task manager but it does not appears in the "Applcations" tab.

Am using QTP 10.0 and Windows 7

please suggest . . . .

thanks
HimsSmile
Reply
#2
Not Solved
Add below code before launching QTP and try...

Code:
call fn_CloseApplication( “QTPro.exe”)
call fn_CloseApplication( “QTAutomationAgent.exe”)

Public Function  fn_CloseApplication( byval sApplicationExe)
Dim strComputer
Dim objWMIService
Dim colProcesses
Dim objProcess
strComputer = “.”
Set objWMIService = GetObject(“winmgmts:\\” & strComputer & “\root\cimv2″)

Set colProcesses = objWMIService.ExecQuery (“Select * from Win32_Process Where Name = ‘”&sApplicationExe&”‘”)
For Each objProcess in colProcesses
objProcess.Terminate()
Next
Set objWMIService = Nothing
Set colProcesses=Nothing
End Function
Reply
#3
Not Solved
Hi vIns . .. thanx a lot fr suggesting a solution . . . . but it seems to be not helpful as even implementing the code suggested by you, am facing the same kind of response.

What actually happening is like I was making it sure that no qtp process is already running in background before running the above mentioned launch script even before u provided the code to kill the processes. When I execute the said script, qtp gets initialized, it appears for a fraction of a second and then disappears. After that, its instance appears in the task manager's processes tab.

The above mentioned code is wrking fine on other machines. I doubt, is this issue is OS specific or firewall or any other thing if u can suggest . . . . ??

I wud b a great favor if u can take a bit more pain in resolving the above problem . . . . .

thnx
Hims . . . . Smile
Reply
#4
Not Solved
Hi,

I am facing same problem.If you know the reason/solution please send across to me.

Thank u in advance.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  "qtp.launch" throwing "class not registered" error auto_tester 0 3,142 08-13-2013, 10:52 PM
Last Post: auto_tester
  Remote QTP launch tester_rahul 3 10,347 07-26-2012, 12:19 PM
Last Post: supputuri
  qtp launch application siri786 3 4,940 04-26-2012, 12:27 AM
Last Post: siri786
  How to launch DBVisualizer and then execute SQL queries sqadri 0 3,460 02-28-2012, 04:58 AM
Last Post: sqadri
  Launch n-times QTP Test with different Excel Files nacchio 3 3,632 11-08-2011, 03:34 PM
Last Post: ravi.gajul

Forum Jump:


Users browsing this thread: 1 Guest(s)