SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Feb 2006
    Location
    Orlando
    Posts
    69
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Dynamic Object Recognision inside script

    I am attempting to write a script that will allow me to use it for variable tests. The trick of this is that when I run the application, it names one of the objects after the file it loads (or just calls it ViewX). My question is this, is it possible to access the object repository to list all children objects inside the code.

  2. #2
    Senior Member
    Join Date
    May 2006
    Location
    Israel
    Posts
    338
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Dynamic Object Recognision inside script

    Hey,
    1. Most objects have a QTP method name .ChildObjects, which returns a collection with all the objects under the current one in the object tree. It even allows you to filter which objects will be included in the collection according to thier attrributes.

    2. Another way to approach this is by recording the object tree once, and use .SetTOProperty on the child objects, in order to change thier properties to match the current run.
    www.AdvancedQTP.com
    'coz we're programmers - not users

 

 

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.40 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.7.1 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 09:09 PM.

Copyright BetaSoft Inc.