tags:

views:

157

answers:

1

I am using WatiN for my web tests. In one of my web pages, I have a VBScript function which opens a dialogbox. I am unable to access it using WatiN.

I tried using WatiNTestRecorder; it was unsuccessful.

I tried this also: http://blogs.dovetailsoftware.com/blogs/kmiller/archive/2008/07/16/scenario-testing-with-watin.aspx, unsuccessful again.

A: 

Did you try the VbScriptMsgBoxDialogHandler? Following an example

     var handler = new VbScriptMsgBoxDialogHandler(buttonToPush);
 using(new UseDialogOnce(Ie.DialogWatcher, handler ))
 {
     Ie.Button("vbScriptMsgBox").ClickNoWait();
     handler.WaitUntilHandled(10);

                Assert.That(handler.HasHandledDialog, "Should have handled dialog");       
 }
Jeroen van Menen