Skip to content

TextMatch

Namespace: E2E

public sealed class TextMatch

A 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

View source

public Regex? Pattern { get; }

The regular expression to test, or null for a string.

Value: Regex

View source

public string? Text { get; }

The string to match, or null for a regular expression.

Value: string

View source

public static TextMatch FromRegex(Regex pattern)

Parameters

Name Type Description
pattern Regex

Returns: TextMatch

View source

public static TextMatch FromString(string text)

Parameters

Name Type Description
text string

Returns: TextMatch

View source

public override string ToString()

Returns a string that represents the current object.

Returns: string — A string that represents the current object.

View source

public static implicit operator TextMatch?(string? text)

Parameters

Name Type Description
text string

Returns: TextMatch

View source

public static implicit operator TextMatch?(Regex? pattern)

Parameters

Name Type Description
pattern Regex

Returns: TextMatch

View source