algot
algot

Reputation: 2438

WatiN: automate Web Page dialog

I use WatiN to automate my testing but how could I handle Web Page dialog window? I can connect to it but can't see source code of it.

Upvotes: 0

Views: 1301

Answers (2)

alonp
alonp

Reputation: 1337

If you want to handle popup dialog use

  ConfirmDialogHandler handler = new ConfirmDialogHandler();
  using (new UseDialogOnce(browser.DialogWatcher, handler))
  {
      browser.Link(Find.ByClass("Your class")).ClickNoWait(); //The action that triggers the dialog
      handler.WaitUntilExists(60);
      handler.OKButton.Click();
  }

Upvotes: 0

Ankush Roy
Ankush Roy

Reputation: 1631

Use firebug in Firefox to see the Page Elements/ Dilaog Elements

Upvotes: 1

Related Questions