SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Dec 2000
    Location
    NY, NY, USA
    Posts
    165
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exception Handling

    Hi All;

    I have a question regarding exception processing...

    My AUT has a window that occasionally pops up to display a message. I just want to respond "OK" to get rid of the window (possible log the occurrence) and continue with the testcase.

    How do I do this? Do I need to create a separate thread? I can't predict when the window will appear.

    In general, how do I catch certain types of errors and handle them (besides the do...except syntax)?

    Thanks;
    Jerry

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Exception Handling

    Jerry:
    Look up Help on the SetTrap method.
    It does exactly what you want.
    -Rob
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  3. #3
    Member
    Join Date
    Dec 1999
    Location
    Columbus, OH
    Posts
    78
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Exception Handling

    There is a SetTrap () method that can be found in help. This does what you are looking for. I have had some problems in the past with it working correctly on Windows 98 machines if I have to trap multiple message boxes.

  4. #4
    bjc
    bjc is offline
    Member
    Join Date
    Jan 2000
    Location
    CT
    Posts
    66
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Exception Handling

    I have found that the SetTrap() method is the best way to get around this. You will probably want to insert it into a TestCaseEnter() function.

    windowname.SetTrap ("OK")
    or if you want to log a message
    windowname.SetTrap ("OK", ErrNum, "Msg To Log")


    [This message has been edited by bjc (edited 02-07-2001).]

  5. #5
    Senior Member
    Join Date
    Dec 2000
    Location
    NY, NY, USA
    Posts
    165
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Exception Handling

    Thanks Rob, Tom, Brian for your answers.

    Jerry

  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: Exception Handling

    Let us know if this worked. I stopped using it a long time ago, because it seemed not to work as expected. I don't remember the details.

 

 

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 02:16 AM.

Copyright BetaSoft Inc.