SPONSORS:






User Tag List

Results 1 to 6 of 6

Thread: WindowList() ??

  1. #1
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    WindowList() ??

    Does anyone know of a 4Test function (supported or otherwise) that would dynamically return a list of all window instances that are defined within the include files for a given test file? The WindowIsDefined() command seems to imply that such a function already exists.

    As an example using:

    window JavaDialogBox ZoneSets
    {
    ...
    }

    window JavaMainwin Zone
    {
    ...
    }

    the result of running:

    Main()
    {
    ListPrint( WindowList() )
    }

    would be a list of windows with "ZoneSets" and "Zone" as members.

    Thanks,

    John

  2. #2
    Member
    Join Date
    Dec 1999
    Location
    Seattle, WA
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: WindowList() ??

    don't think there is. WindowChildren is great for identifying controls within a page (as defined) versus GetChildren (as seen at runtime), but I share your desire for the former on window declares cause right now we must keep these up manually when adding web pages to our frame. guessing you are doing the same...

    ------------------
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>It doesn't matter if I go to heaven or to hell, I have friends in both places.<HR></BLOCKQUOTE>
    <BLOCKQUOTE]<font size=1 face=Verdana, Arial, Helvetica]quote:</font]<HR]It doesn't matter if I go to heaven or to hell, I have friends in both places.<HR]</BLOCKQUOTE]

  3. #3
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: WindowList() ??

    UPDATE: Segue Support has indicated that they'll put it on the enhancement list. Case number is 17056.



  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: WindowList() ??

    One thing I've done in the past is read the .inc file from a script, a parse the file, looking for 'window DialogBox' or 'window MainWin', then compiling a list of the window identifiers. Once you have the line, you could do w = Trim (GetField (sLine, " ", 3)). This will pull the identifier from the line.

    John

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

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

    Re: WindowList() ??

    Kind of what John said is below.
    This is ugly, but it works...

    Call it within a testcase like this:


    [This message has been edited by Damian Synadinos (edited 06-01-2000).]

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

    Re: WindowList() ??

    Hi,

    The function which will return all the windows in a file. You just need to change the file name and possibly the filetypes you want to search for.

    John

    [-] main ()
    [ ] STRING sFile = "frame_all.inc"
    [ ]
    [ ] ListPrint (GetFileObjects (sFile, {"DialogBox", "MainWin"}))
    [ ]
    [ ]
    [-] LIST OF STRING GetFileObjects (STRING sFile, LIST OF STRING lsTypes)
    [ ] LIST OF STRING lsLines
    [ ] STRING sType
    [ ] LIST OF STRING lsObjects
    [ ]
    [ ] ListRead (lsLines, sFile)
    [ ]
    [ ] STRING s
    [ ]
    [-] for each s in lsLines
    [ ] //Print (s)
    [-] for each sType in lsTypes
    [-] if (MatchStr ("*window {sType}*", s))
    [ ] ListAppend (lsObjects, GetField (s, " ", 4))
    [ ]
    [ ] return lsObjects
    [ ]


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

 

 

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 12:21 AM.

Copyright BetaSoft Inc.