I would like to know if this is possible. I think it is but I would like to check. I am running a program that runs for quite a few hours. I want to leave it to run on its own but after a few hours an error message appears and one has to manually click "ok" on the error message before the program continues to run from where it left off. Could I write a small script using an automated tool that will be in a constant loop, looking for this error message and, if it appears, it clicks the "ok" button and then repeats looking for the error message again? Or do you think the automated tool will time out if it is running for a long period of time?
It's doable in WinRunner (and I believe in other automated tools also).
Nevertheless I believe that changing a program setting from "Pop-up Error Messages" to "Log File Error Messages" might be a simpler approach.
One tool you might look at is ScriptIT. It's a free utility from Microsoft that was designed to automate software installations. Basically, you tell it what dialog to wait for and what keyboard buttons to press. It also has an "adlib" feature for the dialogs that may or may not appear in an install (such as upgrade screens.)
For what you are needing, you can tell it to wait for a completely bogus dialog, then set its "adlib" section to the dialog(s) you want to ignore. I don't believe it has a timeout while waiting for a dialog, so you should be able to run it for an extended period.
If you can't find the program on Microsoft's website (it was built for WinNT, but runs fine on newer os's) let me know and I can send you the files.
Yeah this can be done easily. With any test tool or scripting tool you create a little routine to check for the existence of the dialog and then act accordingly. What you may want to do is have it wait like a minute or two in a loop and then check for the dialog. This can be done with a WHILE loop that has the logic check always evaluating to true, and when the dialog is found it either 'breaks' out of the loop or sets the variable for the WHILE loop logic check to a false and then let the WHILE just exit out.
bFlag = 1
While (bFlag == 1)
If (WinExist("dialog title name") == 1)
WinClickPushbutton("dialog title name", "OK")
bFlag = 0