SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Sep 2000
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Timer which can be used to exit testcase

    I am using SilkTest, and need to do the following:

    Sometimes, an unexpected JS pop-up (error) message is displayed. Unfortunately, these pop-ups are not recognized by SilkTest (displayed before browser page is loaded), so I can only dismiss it by using Desktop.TypeKeys ("<ENTER>").

    I would like to use some sort of TIMER, where I could specify a number of minutes, and then do the following if the time is exceeded:
    Desktop.TypeKeys ("<ENTER>")
    TestCaseExit (or similar, to exit the testcase)

    This would "save" me from situations where an unexpected JS pop-up appears, and causes the entire script to hang until manual intervention.

    Has anyone done this before, or does anyone have suggestions?

    Thanks very much...

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

    Re: Timer which can be used to exit testcase

    Are the message boxes that appear always roughly the same?

    If so, you can use "SetTrap".

    Do a search on "SetTrap", as there have been many postings on this.

    ------------------
    Who Tests The Tester...
    Who Tests The Tester...

  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: Timer which can be used to exit testcase

    Here might be a basis for what you want to do.

    [+] INTEGER WaitForLoad(WINDOW w)
    [ ] //************************************************** ************************************************** ************************************
    [ ] //* This function waits for the specified window to load before going on. If it has to wait more than 120 loops (seconds)
    [ ] //* it returns a 0. If the screen loads before 120 loops it returns the number of loops executed.
    [ ] //************************************************** ************************************************** ************************************
    [ ] INTEGER iLoop = 1
    [ ]
    [-] while !(w.Exists ()) //While the specified screen does not exist
    [ ] sleep (1) //Sleep 1 second
    [-] if iLoop > 120 //If iLoop is greater than 120
    [ ] return 120 //Return 0
    [ ] iLoop++ //Increment the loop counter
    [ ] return iLoop //Return the number of loops
    [ ]

    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 05:33 PM.

Copyright BetaSoft Inc.