سؤال

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