/// <summary> /// Asserts that the element is disabled. /// </summary> /// <param name="handle">An <see cref="ElementHandle"/></param> /// <param name="message">Optional failure message</param> /// <remarks><![CDATA[Elements: <button>, <command>, <fieldset>, <input>, <keygen>, <optgroup>, <option>, <select>, <textarea>]]></remarks> /// <returns>The <see cref="ElementHandle"/> for method chaining</returns> public static ElementHandle ShouldBeDisabled(this ElementHandle handle, string message = null) { if (handle.IsEnabled()) { Throw.ShouldBeDisabled(handle, message); } return(handle); }