SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Guest

    Handle Browser Crash/Hang

    How to handle the Browser Hang/Crash events during the automation run to close the existing browser and then restarting the browser and the automation run

    ------------------
    Thanks
    --Surykant

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

    Re: Handle Browser Crash/Hang

    This is tricky but possible.

    Many cases to consider:

    1)Do you need to recover?

    1.1)if yes, recover, then start at a possible starting point
    1.2)if no, start from a possble starting point.

    2. Need a way to find out where are the possble starting point for a recovery. Example if your testcase is constructed with many independent scenarios, then you should pick the scenario you just failed or the following one.

    ---->
    you could use many goto variables at the start of each scenarios. And use a variable to call the appropriate place to go.

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

  3. #3
    Senior Member
    Join Date
    Nov 2000
    Location
    Bloomington, IL
    Posts
    142
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Handle Browser Crash/Hang

    To handle this problem I set a integer variable to a reasonable amount of time for the browser to load. Then set up a loop that increments a integer with every loop and sleeps for 1 second. If the amount of loops executed equals the integer the stored integer I use the Browser.StopLoading() method to stop SilkTest from looking for the browser to finish loading.

    Then I use Browser.Close() to close the browser and log an error so that the script goes to the except statements to restart the script.

    I have also built this piece into a function for moving from screen to screen so that the error does not effect overall testcase error count.

    MikeF

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

 

 

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 09:25 AM.

Copyright BetaSoft Inc.