SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Apr 2001
    Location
    Akron, Ohio, USA
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    GetChildren only returning first level of children

    User Bill Watkins (wwaat@yahoo.com) posted:

    Hello fellow Silkers

    I am having a problem with GetChildren. Here is the
    scenario. I am working on a web based banking app.
    When I do a "Record Window Declarations" this is the
    top level of what I get

    window BrowserChild KeyBank
    tag "Key Bank"
    parent Browser
    KeyPage KeyBankMicrosoftInternet1
    KeyPage KeyBankMicrosoftInternet2

    Now first off let me say that KeyPage is a winclass
    that I have defined as a generic page that has things
    like a common footer that is used etc... The problem
    is when i do this

    LIST OF WINDOW lwObjects = KeyBank.GetChildren ()

    ListPrint (lwObjects)

    I am only get objects back from the
    KeyBankMicrosoftInternet1 object and not the
    KeyBankMicrosoftInternet2 object. The problem gets
    even worse when I delve down into both of these
    objects. They both contain even yet more objects of
    the type KeyPage. Any help would be greatly
    appreciated. If you need more details I will be more
    than happy to tell

    Thanks


    =====

    Bill Watkins

    Quality Assurance Engineer


    __________________________________________________
    Bill Watkins
    QA Project Lead

  2. #2
    Junior Member
    Join Date
    Feb 2001
    Location
    ottawa
    Posts
    21
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: GetChildren only returning first level of children

    I hope I am understanding your question properly...I think what you might need to do is setup a recursive call using both getchilderen and getcontents.
    This is what I did and it is working fine so far.


    you use getcontents to help find the classname of the controls on your web page. This will also include any other frames.
    use getchilderen to get the control.

    Once that is done then you setup the recursive call to step through the array of items if you come across an item where you have to dive into(a new frame or a table that contains listboxes for example) to get more controls from it then your recursive call would be kicked off again and get the items from the new frame or control. what this will do is index all the contols on the page and at the same time you are searching the page and all the controls on it. If your control is there it will be found eventually.

    Hope this makes sense,

    james

    ------------------

  3. #3
    Senior Member
    Join Date
    Aug 1999
    Location
    San Diego, CA USA
    Posts
    219
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: GetChildren only returning first level of children

    The online help says this: "GetChildren includes only those windows that are open at the time of the call. Child windows that are not visible or are off the screen at the time of the call to GetChildren are not included in the list unless you set bInvisible (the first parameter to GetChildren) to TRUE. Note also that GetChildren does not return window parts." Is this the behavior that you are actually seeing?

    Being that you mention the window decs, I'm wondering if what you really want is something more like what the WindowChildren function returns. Online help for WindowChildren says this: "Returns the children of a window, as specified in the declaration."



    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 04:03 PM.

Copyright BetaSoft Inc.