SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Aug 2008
    Location
    India
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    QTP Object Model

    Hi,

    I tried to Launch QTP by using the object model.
    I wrote the following code:

    Set qtApp = CreateObject(”QuickTest.Application”)
    qtApp.Launch
    qtApp.Visible = True
    qtApp.New

    Now i also want to make a connection to the Quality Center and enter the server login details by using the same object model.
    Can u help me with the code for the same?

    Thanks

  2. #2
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP Object Model

    there is no code for QTP AOM. login manually into QC and mark the fields:
    "Reconnect to server on startup"
    "Reconnect to project on startup"
    "Save password for reconnection on startup"

    to change last connected project for each start of QTP look into the file "mic.ini" (application directory/bin/) there are all the last values stored. change as example the value "TDDomain" for other project and "TDDatabase" for other domain
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

  3. #3
    Member
    Join Date
    Jul 2005
    Location
    Melbourne, Australia
    Posts
    453
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP Object Model

    Use the TDConnection object. The TDConnection object gives you access to the QC API, the doco for which comes with your QC installation (Help -> Documentation Library).

  4. #4
    Member
    Join Date
    Jan 2008
    Posts
    121
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP Object Model

    Try this code, this will help u further

    Set conn = CreateObject("TDAPIOLE80.TDConnection")
    conn.InitConnectionEx("http://cqweb:8080:/qcbin")
    conn.ConnectProjectEx MY_PROJECT, "myid", "my passwd"

  5. #5
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP Object Model

    [ QUOTE ]
    Try this code, this will help u further

    Set conn = CreateObject("TDAPIOLE80.TDConnection")
    conn.InitConnectionEx("http://cqweb:8080:/qcbin")
    conn.ConnectProjectEx MY_PROJECT, "myid", "my passwd"

    [/ QUOTE ]

    thats correct, but not affected to the QTP AOM. i think he needs a automated login into QC with QTP, not with ota api-client
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

  6. #6
    Junior Member
    Join Date
    Aug 2008
    Location
    India
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP Object Model

    Hi
    thanks for the code

    I tried this code but it is giving me error - "Invalid Credentials"

  7. #7
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP Object Model

    Login into QC with OTA API is different between QC 8.2 and QC 9.x, look into docu for right login.

    8.2:
    conn.InitConnectionEx <Server>
    conn.ConnectProjectEx <Domain>,<User>,<Password>

    9.2
    conn.InitConnectionEx <Server>
    conn.Login <User>, <Password>
    conn.Connect <Domain>,<Project>


    but again: this will NOT TAKE affect to your QTP session, and you cannot login into QC with QTP AOM (as far as i know), the way is described in my first post in this topic
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

  8. #8
    Member
    Join Date
    Jan 2008
    Posts
    121
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP Object Model

    Try to login manually in QC using ur credentials ....if it works there then this must work in QTP using QC OTA.

    The code provided above must be used with in QTP(Expert View)

  9. #9
    Junior Member
    Join Date
    Aug 2008
    Location
    India
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP Object Model

    thanks

    the code is running fine now as I did not get any errors but the connection is not made.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 05:48 AM.

Copyright BetaSoft Inc.