An expectation for checking that an element's text matches a regex pattern.
public static Func<AvaloniaDriver, bool> TextToMatch(By locator, string pattern)
The locator to find the element.
The regex pattern.