Results 1 to 7 of 7

Thread: Error with CreateObject

  1. #1
    Junior Member
    Join Date
    Jan 2008
    Answers
    2

    Error with CreateObject

    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


  2. #2

    Re: Error with CreateObject

    Try this:

    set qtApp=CreateObject("QuickTest.Application")
    QtApp.visible=true


  3. #3
    Junior Member
    Join Date
    Jan 2008
    Answers
    2

    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?


  4. #4

    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


  5. #5
    Junior Member
    Join Date
    Jan 2008
    Answers
    2

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

    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"

    Hope that helps!

    Quote Originally Posted by shiva_mi View Post
    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


    Last edited by brainwood; 05-15-2008 at 01:03 AM. Reason: why not?

  6. #6
    Junior Member
    Join Date
    May 2013
    Answers
    1

    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 ?


  7. #7
    Junior Member
    Join Date
    Jun 2010
    Answers
    1

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact