It is not clear at all how to test modal dialogs using Watin. AlertDialogHandler(with usingOnce, waituntilexists etc) does not work and blogs talk about using ie.HtmlDialog (ie is their browser object). However the HtmlDialog method does not exist anymore. Thanks in advance !

有帮助吗?

解决方案

HtmlDialog is a method on the IE class, not on the browser class. HtmlDialog is not available for the Firefox browser.

_You'll need to do something like _

IE myIEbrowser = Browser.AttachTo<IE>(...);
myIEBrowser.HtmlDialog....

_Not _

Browser myGenericBrowser = Browser.AttachTo<IE>(...)
myGenericBrowser.HtmlDialog(....    <-  This won't work because the HtmlDialog doesn't exist in the base Browser class.

This is for WatiN 2.1

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top