Beispiel #1
0
        public void SearchFailureData_ToStringForNotMissingElement_By_SearchContext()
        {
            IWebElement contextElement = StubWebElement.Div;

            SearchFailureData data = new SearchFailureData
            {
                By            = By.XPath(".//a"),
                SearchContext = contextElement
            };

            string expected =
                $@"Able to locate element that should be missing:
- By: XPath "".//a""

Context element:
{contextElement.ToDetailedString()}";

            Assert.That(data.ToStringForNotMissingElement(), Is.EqualTo(expected));
        }