0
私はJavaScriptの単純な検証をテストするために以下のコードを使用しました。
以下はWatiNで使用したコードです。ダイアログボックスのエラーの場合asp.net watin:asp.netでwatinを使用してテストを実行中にエラーが発生しましたか?
[STAThread]
static void Main(string[] args)
{
IE ie = new IE("http://localhost:2034/WebForm3.aspx");
ie.ShowWindow(WatiN.Core.Native.Windows.NativeMethods.WindowShowStyle.Maximize);
var confirm = new ConfirmDialogHandler();
ie.AddDialogHandler(confirm);
ie.TextField("TextBox1").TypeText("Pa");
ie.Button("Button2").ClickNoWait();
//dialoghandler.WaitUntilExists(5);
confirm.OKButton.Click();
var dialoghandler = new AlertDialogHandler();
ie.AddDialogHandler(confirm);
**dialoghandler.OKButton.Click();**//the error is could not find dialog does not exist.
dialoghandler.WaitUntilExists(10);
}