RanorexRanorex Documentation
Attribute Method (itemInfo, name, value, message, options)
NamespacesRanorexValidateAttribute(RepoItemInfo, String, Object, String, Validate..::.Options)
Validates if the attribute of the element for the specified repository item matches a specific value.
Declaration Syntax
C#Visual BasicVisual C++
public static bool Attribute(
	RepoItemInfo itemInfo,
	string name,
	Object value,
	string message,
	Validate..::.Options options
)
Public Shared Function Attribute ( _
	itemInfo As RepoItemInfo, _
	name As String, _
	value As Object, _
	message As String, _
	options As Validate..::.Options _
) As Boolean
public:
static bool Attribute(
	RepoItemInfo^ itemInfo, 
	String^ name, 
	Object^ value, 
	String^ message, 
	Validate..::.Options^ options
)
Parameters
itemInfo (RepoItemInfo)
The RepoItemInfo object for the repository item.
name (String)
The name of the attribute to validate.
value (Object)
The value of the attribute to match.
message (String)
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.
options (Validate..::.Options)
Additional Validate..::.Options for this validation action.
Return Value
True if the attribute value matches the specified value; otherwise false.
Exceptions
ExceptionCondition
ValidationExceptionIf the validation fails and options.ExceptionOnFail is true.

Assembly: Ranorex.Core (Module: Ranorex.Core) Version: 4.0.3.22982 (4.0.3.22982)