SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    KS
    KS is offline
    Senior Member
    Join Date
    May 2001
    Posts
    265
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Browser Recovery System

    My main browser pops up child window (these window are actually browsers but without toolbar button, URL address textfield etc. I am not sure what do we call them). If my testcase fails recovery system closes the main browser and tries to type in the url into this open child browser which doesn't have address textfield. Only reason it does that because the windows has title "Microsoft Internet Explorer" which is similar to main browser title. How can I stop recovery system from getting confused without overiding anything in recovery system.

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

  2. #2
    Senior Member
    Join Date
    Sep 2000
    Location
    Twin Cities, MN, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Browser Recovery System



    [This message has been edited by SteveC (edited 06-08-2001).]

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

    Re: Browser Recovery System

    Browser is the current browser. The "other" (background) browser is Browser2. When you make Browser2 active, it changes to Browser.

    I've been dealing with closing child windows a lot lately. There are several possible solutions.

    1) Close the child window EVERY time within the testcase with TypeKeys ("<Alt-F4>")

    2) Close the child window with Browser.Close ()

    3) Write a function which does Desktop.Getchildren (). Then cycle through each window and check if it has a Location and Buttons, etc. Close the ones that are not the right one.

    4) Get the hWnd of the original window and store in a variable. Write a function which does Desktop.Getchildren (). Then cycle through each window and check if it is a Browser and if it's hWnd does't match the original windows's hWnd, Close it.

    Hope this helps.

    Email me for more details or assitance.



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

  4. #4
    KS
    KS is offline
    Senior Member
    Join Date
    May 2001
    Posts
    265
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Browser Recovery System

    Let me explain the exact situation. My main browser calls this child browser(which doesn't contain any buttons or menu items etc.) while dealing with child browser, let say, my testcase fails. So recovery system kicks in before I can call Browser.Close() or any other closing method,it closes the main browser and think of child as real browser window and give the follwing error message

    Explorer.View.Toolbars.AddressBar.Pick ()
    [ ] *** Error: Window '[PushButton]View' was not found


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

  5. #5
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Browser Recovery System

    Learn this from yesterday's post.

    Use GetCloseWindows() to know the list of windows that if closed will return you to the basestate(whatever state before your testcase started).

    1)first try to debug to see if your popup window is in that list.

    2)second you can use the above function to return a list of window hence you can loop through the list and do a check for your popup window.
    This approach is reasonable, since I don't expect your test to have 100 windows open. So it will be quiet fast(relative to silk's speed .




    [This message has been edited by GodKnows (edited 06-08-2001).]

  6. #6
    Senior Member
    Join Date
    Sep 2000
    Location
    Twin Cities, MN, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Browser Recovery System

    Check out, "Using do...except to handle an exception" in SilkTest's help index.

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

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

    Re: Browser Recovery System

    In your frame, add

    Using the ideas GK and others have posted, write the CloseChildWindows () function to parse the open windows and close the ones you need closed.

    TestCaseExit () automatically overrides DefaultTestCaseExit () which is called when a testcase finishes executing. SilkTest passes the bExcept argument which is set to true if an error has occured. ExceptNum () will give you the exact error which has occurred.

    Hope this helps.


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

Copyright BetaSoft Inc.