我在确认对话框中单击确定按钮时遇到问题。这是我使用的,但它没有激活OK,也没有从对话框获取消息属性。关于什么是错误的任何想法或者更好的是,你是否有任何代码在确认对话框中单击确定?
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();
}
脚本在这里失败了... confirmHandler.WaitUntilExists();