 | 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
Syntaxstring GetAttributeValueText(
string name,
Regex regex
)
Function GetAttributeValueText (
name As String,
regex As Regex
) As String
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:
StringThe value of the attribute converted to its string representation and optionally
matched by the provided
regex regular expression.
Exceptions| Exception | Condition |
|---|
| ArgumentNullException | If name is null. |
Remarks
See Also