OpenQA.Selenium.ElementAttributeTest.ShouldReturnNullWhenGettingSrcAttributeOfInvalidImgTag C# (CSharp) Méthode

ShouldReturnNullWhenGettingSrcAttributeOfInvalidImgTag() private méthode

private ShouldReturnNullWhenGettingSrcAttributeOfInvalidImgTag ( ) : void
Résultat void
        public void ShouldReturnNullWhenGettingSrcAttributeOfInvalidImgTag()
        {
            driver.Url = simpleTestPage;
            IWebElement img = driver.FindElement(By.Id("invalidImgTag"));
            string attribute = img.GetAttribute("src");
            Assert.IsNull(attribute);
        }