コード例 #1
0
        public void ValidateTextFieldValueContains(string expectedValue)
        {
            string text          = GetValue();
            string messagePassed = $"The (Text Field) [ {ControlName} ] contains the CORRECT value: [ {expectedValue} ].";
            string messageFailed = $"The (Text Field) [ {ControlName} ] contains the WRONG value: [ {text} ], when it should contain the expected value: [ {expectedValue} ].";

            ExceptionManager.AssertContains(expectedValue, text, messagePassed, messageFailed);
        }
コード例 #2
0
        public void ValidateSpanContains(string expectedValue)
        {
            string text = WebElement.Text;

            string messagePassed = $"The (Span) [ {ControlName} ] contains the CORRECT value: [ {expectedValue} ]";
            string messageFailed = $"The (Span) [ {ControlName} ] contains the WRONG value: [ {text} ], when it should contain the expected value: [ {expectedValue} ]";

            ExceptionManager.AssertContains(expectedValue, text, messagePassed, messageFailed);
        }