SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Mar 2008
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Identify an object within another object

    Hi all,
    I have read through a good number of posts about identifying objects, getting object properties, child properties, object spying, etc. However, I didn't see anything about QTP not recognizing an object within another object.

    I am using QTP 9.2 on a windows based app, and my problem is this:

    I am trying to validate an "edit" button is disabled within a toolstrip. However, QTP does not recognize any objects within the toolstrip, only the toolstrip itself.

    When the button is enabled, I can execute the following:
    SwfWindow("Dashboard").SwfToolbar("toolStrip1").Pr ess "Edit"

    This is interesting as QTP is able to click the button when it is enabled. However, whenever I try to identify the button, using object spy, in a checkpoint, GetROProperty etc., QTP can only identify the toolstrip, not the button within.

    How can I validate if a button is disabled if QTP doesn't seem to be able to identify the button?

    Thanks

  2. #2
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Identify an object within another object

    Do one thing, add the object when it is enabled and then try to identify it with same object definition when it is disabled.

  3. #3
    Junior Member
    Join Date
    Mar 2008
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Identify an object within another object

    Turan, thanks,

    I have tried that as well. I can record the button when it is enabled, but QTP only captures and saves the toolstrip, not the button within the toolstrip. I have also tried manually adding the button to the repository using object add, but once again QTP, only captures at the toolstrip level.

    I have used HAWKEYE (which works like the object spy) and it IS able to identify the button as "tsbEDIT" and capture the button's properties. Not sure why QTP only sees the toolstrip.

    Any other ideas?

  4. #4
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Identify an object within another object

    Did you spy when the object was enabled? And also where to find this HAWKEYE tool?

  5. #5
    Junior Member
    Join Date
    Mar 2008
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Identify an object within another object

    Correct. Whether the button is enabled or disabled, it doesn't matter. QTP only sees the higher level 'toolstrip'.

    I am looking for the HAWKEYE link. It is a nifty little tool [img]/images/graemlins/smile.gif[/img]

  6. #6
    Junior Member
    Join Date
    Mar 2008
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Identify an object within another object

    Hawkeye - www.acorns.com.au/Projects/Hawkeye/

    The links are really slow, but the download should be there. The basic version is free to use.

  7. #7
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Identify an object within another object

    Ok, The only thing that you can do now is to use the .Object property of the SWfToolbar and see how to get the internal objects using .NET code.

 

 

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 12.50%
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 06:22 PM.

Copyright BetaSoft Inc.