SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Mar 2000
    Location
    New York, NY, USA
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Get list of windows

    I am testing a Java application where each window is a Main window. Does anybody know how can I get a list of all declared windows?

    Thanks in advance.

  2. #2
    Senior Member
    Join Date
    Mar 2000
    Location
    pisctaway, NJ USA
    Posts
    188
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get list of windows

    No way I know of except to build yourself a list.

    Anthony

  3. #3
    Senior Member
    Join Date
    Jul 1999
    Location
    Columbus, OH, USA
    Posts
    689
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get list of windows

    I suppose you could use this function in a recursive loop. It simply tries to define a window based on an expected (existing?) string. If the window exists in an included include file, the function returns TRUE.

    NOTE: MakeWindowIdentifier() was my custom function that parsed the Dynamic Instantiation of a window into a string that followed my Window Declaration Naming Convention. You will want to create your own. Mine is listed below as an example.


  4. #4
    Senior Member
    Join Date
    Jul 1999
    Location
    Burlingame CA 94010
    Posts
    502
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get list of windows

    Just build a list of window

    Example:
    LIST OF WINDOW lwMainWins = {...}
    Prefs
    Login
    Configure
    Setup
    etc.

    Then you can use the for each loop to check which ones are present, etc.

    WINDOW w

    for each w in lwMainWins
    if (w.Exists ())
    w.Close ()

    Hope this helps


    ------------------
    John W Green
    jwgreen@automationexpertise.com
    http://www.automationexpertise.com

  5. #5
    Member
    Join Date
    Dec 1999
    Location
    Rochester, NY, USA
    Posts
    52
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get list of windows

    You could utilize the WindowChildren function in SilkTest. This is a very powerful function but unfortunately there is no "root window" (that I've seen). But I think that would apply fine for what you are doing.

    With this virtual window, you will be more closely modelling your application. This will allow you to "broadcast" method calls to the appropriate windows. But it does add some complexity to the script structure.

    Hope this information helps you through.
    Andy Bachman

 

 

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 08:58 PM.

Copyright BetaSoft Inc.