Click or drag to resize
Ranorex

IElementGetAttributeValueText Method (String, Regex)

Returns the value of an attribute converted to its string representation. If a regex is provided, only the part of the string representation matching the regular expression is returned.

Namespace:  Ranorex.Core
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
string GetAttributeValueText(
	string name,
	Regex regex
)

Parameters

name
Type: SystemString
The name of the attribute.
regex
Type: System.Text.RegularExpressionsRegex
A regular expression that defines which part of the attribute value string representation should be returned. If more than a single group (= whole match) is captured by the regex, the second group (mark using "(?<1>expression)") is returned.

Return Value

Type: String
The value of the attribute converted to its string representation and optionally matched by the provided regex regular expression.
Exceptions
ExceptionCondition
ArgumentNullExceptionIf name is null.
Remarks
This method internally calls GetAttributeValue(String) and converts the returned value to its string representation using the ValueConverter.
See Also