예제 #1
0
        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);
        }
예제 #2
0
        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);
        }