 | ValidateAttribute Method (RepoItemInfo, String, Regex) |
Validates if the attribute of the element for the specified repository item matches a specific regular expression.
Namespace:
Ranorex
Assembly:
Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntaxpublic static void Attribute(
RepoItemInfo itemInfo,
string name,
Regex regex
)
Public Shared Sub Attribute (
itemInfo As RepoItemInfo,
name As String,
regex As Regex
)
Parameters
- itemInfo
- Type: Ranorex.Core.RepositoryRepoItemInfo
The RepoItemInfo object for the repository item. - name
- Type: SystemString
The name of the attribute to validate. - regex
- Type: System.Text.RegularExpressionsRegex
The regular expression to validate the attribute value
string representation against.
Exceptions| Exception | Condition |
|---|
| ArgumentNullException | If regex is null. |
| ValidationException | If the validation fails. |
See Also