User ( posted:

This Dr. Watson error was occurring on our lab machines and to receive this
note is quite funny because we just added some code to handle the annoying
window when they occur during the Automation Test start-up process.

The following is a piece of code that was added to our Main Script to check
for Dr. Watson windows at start-up and if the window is present it will
close the window, report that a Dr. Watson was present to Test Director and
kill the test.

In addition to adding the below script to check for the window, you will
need to add the window name to the GUI Map so the window will be

This will only check for Dr. Watson's at start-up, the Exception Handler
would be the best approach when the Dr. Watson's occur during your
automated test run.

Here it is:

#^#Is there a [Dr. Watson |Window |Present?]?
RC = win_exists("Dr. Watson for Windows NT",-10);

if(RC == E_OK)
RC = set_window ("Dr. Watson for Windows NT", DelayTime);

RC = button_press("{class: push_button, label: \"OK\"}");

if (RC != E_OK)
tl_step("StartUp", FAIL, "Error closing previously open Dr. Watson
tl_step("Dr. Watson", FAIL, "Dr. Watson window Present");

listserver@me To:
cc: (bcc: Rich Meyers)
01/11/02 Subject: [Mercury Interactive WinRunner
09:20 AM Discussion Forum] - Exception Handling for Dr

SUBJECT: Exception Handling for Dr Watson

That's the idea. However, I won't know that it exists until I run the
script. Once we receive it the first time, then we have the server guy fix
whatever he has to fix and it works. I just want to be able to handle it
in the script when we do receive it.

When using a pause will it completely stop the execution of the script or
just wait for user to specify continue? I actually want to script to end
with a failed status.


To post a reply to this message go to

You will need to login using your regular username & password


If you do not want to receive email from this FORUM in the future, go to


If you do not want to receive email from this THREAD in the future, go to