0

我正在使用WatiN进行网络测试。在我的一个网页中,我有一个打开对话框的 VBScript 函数。我无法使用 WatiN 访问它。

我尝试使用 WatiNTestRecorder;它没有成功。

我也试过这个:http: //blogs.dovetailsoftware.com/blogs/kmiller/archive/2008/07/16/scenario-testing-with-watin.aspx,再次失败。

4

1 回答 1

1

您是否尝试过 VbScriptMsgBoxDialogHandler?跟随一个例子

        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");                
    }
于 2009-03-31T15:45:57.400 回答