public override bool CheckExpectation(IWebDriver webDriver) { var matches = StringCompare.IsMatch(webDriver.Url, MatchType, Url); if (!matches) { Message = $"URL expected to be `{Url}` but was `{webDriver.Url}` (Match type: {MatchType})"; } return(matches); }
public override bool CheckExpectation(IWebDriver webDriver) { IWebElement element = Utils.GetElementByPath.GetElement(Target, webDriver); var text = element.Text; var matches = StringCompare.IsMatch(text, MatchType, Text); if (!matches) { Message = $"`{Target.Path}` expected to be `{Text}` but was `{text}` (Match type: {MatchType})"; } return(matches); }