Click or drag to resize
Ranorex

ValidateAttributeEqual Method (RepoItemInfo, String, Object, String, Boolean)

Validates if the attribute of the element for the specified repository item matches a specific value.

Namespace:  Ranorex
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
public static bool AttributeEqual(
	RepoItemInfo itemInfo,
	string name,
	Object value,
	string message,
	bool exceptionOnFail
)

Parameters

itemInfo
Type: Ranorex.Core.RepositoryRepoItemInfo
The RepoItemInfo object for the repository item.
name
Type: SystemString
The name of the attribute to validate.
value
Type: SystemObject
The value of the attribute to match.
message
Type: SystemString
The message to log. "{0}" is replaced by the name of the itemInfo object, "{1}" by the attribute name, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expected value.
exceptionOnFail
Type: SystemBoolean
A value specifying if an exception should be thrown if the validation fails.

Return Value

Type: Boolean
True if the attribute value matches the specified value; otherwise false.
Exceptions
ExceptionCondition
ValidationExceptionIf the validation fails and exceptionOnFail is true.
See Also