SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    May 2002
    Location
    Ottawa, ON, Canada
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Handle Multiple Windows with Same Caption

    I've been reading through the forums, and couldn't find anybody that had the same problem I'm having now. Basically I have a web application that I need to test for concurrency. However, the window caption for the multiple windows I open are the same! How do I let SilkTest see them as different windows?

    Thanks!


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

  2. #2
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Handle Multiple Windows with Same Caption

    Silk will number your browsers as they open. You can switch between them by setting the other browser active. It's been several years since I've done this, but if I remember correctly, the "Active" browser is always browser#1.

    Someone please correct me on this if I'm mistaken.

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

  3. #3
    Member
    Join Date
    Dec 2000
    Location
    Bannockburn, IL
    Posts
    60
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Handle Multiple Windows with Same Caption

    The following syntax gives an compile error:

    Browser[1].Minimize()
    Browser[2].SetActive()

    also...

    Browser("#2").SetActive()
    Browser("#2").Maximize()

    How do you reference and control mulitiple open browser windows?

  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: Handle Multiple Windows with Same Caption

    SilkTest defines Browser and Browser2. Browser will always be the current browser while Browser2 is the one in the background. If you set Browser2 active, it immediately becomes Browser. If you need to return to a specific window, you can remember its caption, URL or get its hWnd so later in the testcase you can be sure to return to the correct window.

    Hope this helps.

  5. #5
    Member
    Join Date
    Dec 2000
    Location
    Bannockburn, IL
    Posts
    60
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Handle Multiple Windows with Same Caption

    John,

    Knowing the window handle, how do I set that window active or bring it to the top?

    For instance, I have 2 open browser windows:
    iWindowHandle1 = 500
    iWindowHandle2 = 200

    Browser #1 (hwnd 500 is currently active)

    How do set or bring to focus window #2 (hwnd 200) ?

    Thanks.

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

  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: Handle Multiple Windows with Same Caption

    window #2 will be recognized by SilkTest as Browser2. After you set it active, it will be recognized as Browser.


  7. #7
    Member
    Join Date
    Dec 2000
    Location
    Bannockburn, IL
    Posts
    60
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Handle Multiple Windows with Same Caption

    I understand about the Browser and Browser2 windows. For my purposes, this is not that reliable.

    My question, specifically, is this; knowing the handle (hWnd - returned by GetHandle()), how can I call on that window - by handle - and set it active?

    More of a syntax question than concept.

    I ask this because in an earlier post in this thread, you stated "..or get its hWnd so later in the testcase you can be sure to return to the correct window".

    Thank you,

    geliopou

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


    [This message has been edited by geliopou (edited 07-16-2002).]

 

 

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:07 AM.

Copyright BetaSoft Inc.