I am trying to run a few test steps based on the text within an error message. I am unable to get my user code to work. I tried this:
Code: Select all
public void MergedUserCodeMethod1(RepoItemInfo textInfo, RepoItemInfo buttonInfo, RepoItemInfo checkboxInfo, RepoItemInfo radiobuttonInfo)
{
Report.Log(ReportLevel.Info, "Get Value", "Getting attribute 'Text' from item 'textInfo' and assigning its value to variable 'VarDateAgeError'.", textInfo);
VarDateAgeError = textInfo.FindAdapter<Text>().Element.GetAttributeValueText("Text");
if (VarDateAgeError.Equals("Interest Rate Must be Selected for This Plan."))
{
Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'buttonInfo' at Center.", buttonInfo);
buttonInfo.FindAdapter<Button>().Click();
Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'checkboxInfo' at Center.", checkboxInfo);
checkboxInfo.FindAdapter<CheckBox>().Click();
Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'radiobuttonInfo' at Center.", radiobuttonInfo);
radiobuttonInfo.FindAdapter<RadioButton>().Click();
}
}
Anyone have any ideas?