By: henrywasserman ( Henry Wasserman )
RE: How to close dialog box ?
2002-11-14 10:10
The call to VerifyMessageBox sets up a suspended process in Windows. This suspended process is waiting to be unsuspended so it can start looking for the message box and then time out if it has to.

To unsuspend the message, you call the button that will raise the message box like this...

ClickFormButton("nextButton",1), The optional second parameter of 1 will tell the VerfiyMessageBox thread to start looking for the messagebox.

By: henrywasserman ( Henry Wasserman )
RE: How to close dialog box ?
2002-11-14 09:14
I am going to assume that you are trying to close a javascript message box. If this is not the case let me know and I will post how to close other windows that may appear as well..

Here's some sample code to close a javascript type messagebox.

VerifyMessageBox("Microsoft Internet Explorer","Username must be at least 3 characters.",$Win32::SAM::testcase);

VerifyMessageBox takes three parameters...

$Caption - The Window Title

$Expected Text - The Text you want to verify on the message box.

$testcase - The testcase number

Let me know if you have any problems.

Henry Wasserman

By: derek001 ( derek )
RE: How to close dialog box ?
2002-11-15 00:44
what if there are continuous dialogs ?
correct me if I'm wrong.
I found that the running process only owns the latest handle of the process it creates to close the dialog box which means I can't register multiple dialog boxes, can I ?
what I want to do is like this

VerifyMessageBox( dlg1)
VerifyMessageBox( dlg2)
clickformButton(..,1) -> then it will close two continuous dialog boxes

Is there any way to do that ?Thanks