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();
精彩评论