OpenQA.Selenium.ElementSelectingTest.AssertCannotToggle C# (CSharp) Méthode

AssertCannotToggle() private static méthode

private static AssertCannotToggle ( IWebElement element ) : void
element IWebElement
Résultat void
        private static void AssertCannotToggle(IWebElement element)
        {
            try
            {
                element.Click();
                Assert.Fail(string.Format(assertCannotPerformActionFormat_action_element, "toggle", Describe(element)));
            }
            catch (InvalidElementStateException)
            {
                //Expected
            }
        }