private static void AssertCannotSelect(IWebElement element) { try { element.Click(); Assert.Fail(string.Format(assertCannotPerformActionFormat_action_element, "select", Describe(element))); } catch (InvalidElementStateException) { //Expected } }