GetErrorMessage() 공개 메소드

Gets an error message for an invalid element.
public GetErrorMessage ( BaseHtmlElement element ) : string
element BaseHtmlElement The invalid element.
리턴 string
예제 #1
0
        public void GetErrorMessage()
        {
            var webElement = MockRepository.GenerateStub<IWebElement>();
            webElement.Stub(x => x.TagName).Return("input");

            var element = new ElementForTest(webElement);
            var attribute = new NotInputAttribute();
            attribute.GetErrorMessage(element).Should().Be("Expected tag not in set of input, textarea, select, button, option. But was 'input'.");
        }