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

ShouldCorrectlyReportValueOfColspan() public méthode

public ShouldCorrectlyReportValueOfColspan ( ) : void
Résultat void
        public void ShouldCorrectlyReportValueOfColspan()
        {
            driver.Url = tables;
            System.Threading.Thread.Sleep(1000);

            IWebElement th1 = driver.FindElement(By.Id("th1"));
            IWebElement td2 = driver.FindElement(By.Id("td2"));

            Assert.AreEqual("th1", th1.GetAttribute("id"), "th1 id");
            Assert.AreEqual("3", th1.GetAttribute("colspan"), "th1 colspan should be 3");

            Assert.AreEqual("td2", td2.GetAttribute("id"), "td2 id");
            Assert.AreEqual("2", td2.GetAttribute("colspan"), "td2 colspan should be 2");
        }