OpenQA.Selenium.RenderedWebElementTest.ShouldPickUpStyleOfAnElement C# (CSharp) Méthode

ShouldPickUpStyleOfAnElement() private méthode

private ShouldPickUpStyleOfAnElement ( ) : void
Résultat void
        public void ShouldPickUpStyleOfAnElement()
        {
            driver.Url = javascriptPage;

            IWebElement element = driver.FindElement(By.Id("green-parent"));
            string backgroundColour = element.GetCssValue("background-color");

            Assert.That(backgroundColour, Is.EqualTo("#008000").Or.EqualTo("rgb(0, 128, 0)"));

            element = driver.FindElement(By.Id("red-item"));
            backgroundColour = element.GetCssValue("background-color");

            Assert.That(backgroundColour, Is.EqualTo("#ff0000").Or.EqualTo("rgb(255, 0, 0)"));
        }