Question

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 !

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top