I am trying to validate button within menu ribbon in user code module.
The following code is to get attribute value:
Code: Select all
var buttonChecked = repo.LayoutWindow.ButtonValidation.GetAttributeValue<string>("AccessibleState").Contains("Checked");
In case I am running
Code: Select all
public void Validate_ButtonValidation(RepoItemInfo buttonInfo)
{
Report.Log(ReportLevel.Info, "Validation", "Validating AttributeContains (AccessibleState>'Checked') on item 'buttonInfo'.", buttonInfo);
Validate.AttributeContains(buttonInfo, "AccessibleState", "Checked");
}
Can someone help me to understand why GetAttrubuteValue function doesn't work for me?
I have to validate if button selected or not and then do some steps accordingly.
I added snapshot of the button.
Thanks,
Felix.