- Code: Select all
bool exists = Validate.Exists(repo.ErrorPopUp.ButtonOKInfo, "popup Email Alert'{0}'",false);
if(exists)
{
// Identify the webdocument by its title
WebDocument webDocument = "/Container[@caption='Very quick check ']";
//find the ok bttn on dialogue
Ranorex.Button button = webDocument.FindSingle("/form[@title='Message from webpage']/button[@text='OK']");
//send screenshot to report
Report.Screenshot("/form[@title='Message from webpage']" + "email validation pass");
//click ok on popup
button.Click();
}
Thanks,
Beginner