Code: Select all
if (Condition=="Pass if Alarm Text is Present")
{
Report.Log(ReportLevel.Info, "Validation", "Validating AttributeEqual (InnerText=$Message) on item 'Site.NewFolder.TheUnitIsExitingFenceBrandyn'.", repo.Site.NewFolder.TheUnitIsExitingFenceBrandynInfo);
Validate.Attribute(repo.Site.NewFolder.TheUnitIsExitingFenceBrandynInfo, "InnerText", Message);
}
else
{
Report.Log(ReportLevel.Info, "Validation", "Validating AttributeEqual (InnerText=$Message) on item 'Site.NewFolder.TheUnitIsExitingFenceBrandyn', is not Present", repo.Site.NewFolder.TheUnitIsExitingFenceBrandynInfo);
Validate.Attribute(repo.Site.NewFolder.TheUnitIsExitingFenceBrandynInfo, "InnerText", Message);
}
if they want the test to pass when the text is equal to anything but whats in the field they want to know that as well. a client is being picky about this, essentially they want to be very sure that the validation is working on multiple ends.
the simple questions is this, Can I invert the logic of a validation step simply?
I tried to play around with the Validate.notexists, however that sounded like it would only look to see if the element was not there, nothing to match against.
Any assistance would be appreciated.