TextMatch
Namespace: E2E
public sealed class TextMatchA string or a regular expression, the upstream TextMatch, used by
both screen queries and expectations. In a query, a string matches exactly
by default, and exact: false makes it a case-insensitive substring;
a Regex is tested against the whitespace-normalized text and
ignores exact. Converts implicitly from both.
Inheritance: object
Properties
Section titled “Properties”Pattern
Section titled “Pattern”public Regex? Pattern { get; }The regular expression to test, or null for a string.
Value: Regex
public string? Text { get; }The string to match, or null for a regular expression.
Value: string
Methods
Section titled “Methods”FromRegex(Regex)
Section titled “FromRegex(Regex)”public static TextMatch FromRegex(Regex pattern)Parameters
| Name | Type | Description |
|---|---|---|
pattern |
Regex |
Returns: TextMatch
FromString(string)
Section titled “FromString(string)”public static TextMatch FromString(string text)Parameters
| Name | Type | Description |
|---|---|---|
text |
string |
Returns: TextMatch
ToString()
Section titled “ToString()”public override string ToString()Returns a string that represents the current object.
Returns: string — A string that represents the current object.
Operators
Section titled “Operators”implicit operator TextMatch?(string?)
Section titled “implicit operator TextMatch?(string?)”public static implicit operator TextMatch?(string? text)Parameters
| Name | Type | Description |
|---|---|---|
text |
string |
Returns: TextMatch
implicit operator TextMatch?(Regex?)
Section titled “implicit operator TextMatch?(Regex?)”public static implicit operator TextMatch?(Regex? pattern)Parameters
| Name | Type | Description |
|---|---|---|
pattern |
Regex |
Returns: TextMatch