开发者

How to deal with a confirming dialog?

I am having an issue with clicking on an OK button in a confirming dialog. This is what I have used but it isn't activating the OK nor is it getting the message property from the dialog. Any ideas as to what is wrong OR better yet, do you have any code that clicks on OK in a confirm dialog?

var confirmHandler = new ConfirmDialogHandler();
using (new UseDialogOnce(newIee.DialogWatcher, confirmHandler))
{                       
    //Click EXIT  - CT__Exit
    Regex ex = new Regex("CT__Exit");
    newIee.Image(Find.ById(ex)).ClickNoWait();
    string temp = confirmHandler.Message;
    confirmHandler.WaitUntilExists();
    Assert.AreEqual(
       "Warning! Policy Number or Transaction Type was changed."
       + " Are you sure you want to exit the case?", 
       confirmHandler.Message);
    confirmHandler.OKButton.Click();
}开发者_开发百科

The script is failing here...confirmHandler.WaitUntilExists();

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜