Code: Select all
public void Handle_messagebox()
{
if(repo.Folder1.Button1Info.Exists())
{
Report.Info("Found message box. Clicking on Ok button.");
repo.Folder1.Button1.MoveTo();
repo.Folder1.Button1.Click();
}
else
{
Report.Info("Did not find Message box.");
}
}
This is inconsistent, This passes sometimes and fails most of the times. Sometimes it gets struck in the 'if' statement itself, once button is clicked manually info message in else statement in displayed.
This happens particullary with this message box only, with other this kind of message/dialog box, it seems to be working fine.
Can anyone please clarify why this is happening and how we can rectify it?