Re: Error with CreateObject
Try this:
set qtApp=CreateObject("QuickTest.Application")
QtApp.visible=true
Re: Error with CreateObject
But QTP is throwing up a run time error when it comes to the first line itself of
set qaApp = CreateObject("QuickTest.Application")
It is not even progressing further
is there any specific libabry file that has to be loaded at run time?
Re: Error with CreateObject
It can be because you are running it on the server, as I have not worked with Citrix applications. However, the script that I posted works perfectly on mine.
Anyhow, I doubt this is going to work either, but try this and see if this works:
Dim oIEApp
Set oIEApp=CreateObject("InternetExplorer.Application")
oIEApp.visible=True
Solution: Error with CreateObject
I also had this issue. It has to do with the quicktest dcom object.
Either it doesn't exist, the permissions aren't correct, it is being run under the wrong user or it is trying to run remotely on a different computer.
Your configuration will depend greatly on what you are trying to achieve, however here are the steps to set up a basic config to run on the local machine:
[COLOR="Navy"]
1) open the dcom configuration tool by going start -> run -> dcomcnfg from there expand component services, then computers, my computer, dcom config.
2) Locate quicktest professional automation, right click it and open properties.
3) General tab: set authentication level to default
4) Location tab: check run application on this computer uncheck the other two options
5) Security tab: you should be able to set all options as "use default". If you start getting a permissions error after changing these, you may need to give your current user privileges. If you're sure the user already has privileges but still get the permissions error, open task manager and look for qtautomation.exe in processes - if it's there, kill the process, and try again.
6) Endpoints tab: "... Default system protocols ..." is all that should be displayed
7) Identity tab: select "the interactive user"
[/COLOR]
Hope that helps!
[quote=shiva_mi;24602]hi, i am using the following line in my script set qtapp = createobject("quicktest.application") to create an instance of qto so as to be able to associate the object repository with the script but while executing the script i am getting a run time error. Not much details displayed, just ' general run error' i have even declared the variable qtapp. Any idea what can be the reason. I am using qtp on citrix server(could that be a reason, though i doubt it) any help would be greatly appreciated[/quote]
Re: Error with CreateObject
Set oIEApp=CreateObject("InternetExplorer.Application") works perfectly fine.
But set qaApp = CreateObject("QuickTest.Application") doesnt work and the script doesnt process further.
Any suggestions to resolve the problem ?
Re: Error with CreateObject
Hi Pavan
set qaApp = CreateObject("QuickTest.Application") this absolutely fine this class helps to perform operation on QTP overall like
1.launched
2.Visible
3.open
after that if you want to perform operation on a particular test like add OR,add Lib etc then you have to set another reference as
Set qtpTest = qaApp.Test
If you need any further details or any doubt on QTP please visit my blog