Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP Error
#1
Solved: 11 Years, 4 Months ago
Hi all

I used this .vbs file to start my QTP test

Code:
Dim qtpApp    
   Dim qtpTest      
   Set qtpApp = CreateObject("QuickTest.Application")    
   qtpApp.Visible = true
   qtpApp.Open "C:\abc\Data", True  
   Set qtpTest = qtpApp.Test  
   qtpTest.Run
   qtpTest.Close
   qtpApp.quit
   Set qtTest = Nothing
   Set qtApp = Nothing

when i run it sometimes at the first time it generates a error.
(I attached error in snapshot) then i rerun the .vbs and it works well

What can be the reason ?

thanks


Attached Files Image(s)
   
Reply
#2
Solved: 11 Years, 4 Months ago
Hi eroshan,

please run the QuicktestProfessional.bat file present in the bat file. Might be this will resolve your situation.

Let me know if you need any more info.
Thanks,
SUpputuri
Reply
#3
Solved: 11 Years, 4 Months ago
Hi
I think you advise me to start QTP using .bat file isn't it?
I tried it but not success,

don't you have any other solution?

Thanks
Reply
#4
Solved: 11 Years, 4 Months ago
Not sure what could be the reason, Your code is working fine at my side.
I have also observed the issue many times and on another run it works.
what I can suggest that -
-Make sure you have provided the correct Test path.
-Try putting the statement 'qtpApp.Launch ' before making it visible

let me know if it helps.

Reply
#5
Solved: 11 Years, 4 Months ago
Hi Saket

As i mention earlier sometimes it works well. i add your code and run. so this time also it works well.i don't know it fixed or not. anyway thanks a lot
Reply
#6
Solved: 11 Years, 4 Months ago
Make sure the QTP Automation Agent is not running at the Windows Task Manager, before starting your second run.
May be that is causing the issue.

Reply
#7
Solved: 11 Years, 4 Months ago
Hi

Saket there is no problem to run in the second time , this error appear only for first time

thanks
Reply
#8
Solved: 11 Years, 4 Months ago
Which version of QTP are you using ??

Quicktestproffesional.bat is avaiable only uptil 9.2 ver.

Did you uninstall and Re-install QTP ??

If you havent got a solution yet, Search this forum to see how you can perform a clean un-install and reinstall of qtp.

nope. QTPKing wants you to navigate to C:\program files\Mercury Interactive\Quick Test Proffesional\bin\QuickTestProffesional.bat

double click on that .bat file.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#9
Solved: 11 Years, 4 Months ago
Hi QTPKing

I did what you ask , after that error appear rate is getting increased. it came 3 times out of 4. What should i do now ? i am using QTP 9.0
Reply
#10
Solved: 11 Years, 4 Months ago
1. Uninstall-Reinstall QTP. Search on this forum and you will get the clean un-install instructions.
2. IF the issue persists, Log it up with HP.

Contrarily, Any specific reason you are with QTP 9.0 ?? Maybe you can upgrade it to the higher version and see if the error still persists. - Just a suggestion.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)