OpenQA.Selenium.ClickScrollingTest.ShouldNotScrollOverflowElementsWhichAreVisible C# (CSharp) Méthode

ShouldNotScrollOverflowElementsWhichAreVisible() private méthode

private ShouldNotScrollOverflowElementsWhichAreVisible ( ) : void
Résultat void
        public void ShouldNotScrollOverflowElementsWhichAreVisible()
        {
            driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("scroll2.html");
            IWebElement list = driver.FindElement(By.TagName("ul"));
            IWebElement item = list.FindElement(By.Id("desired"));
            item.Click();
            long yOffset = (long)((IJavaScriptExecutor)driver).ExecuteScript("return arguments[0].scrollTop;", list);
            Assert.AreEqual(0, yOffset, "Should not have scrolled");
        }