/// <summary> /// Asserts that the element does not have focus. /// </summary> /// <param name="handle">An <see cref="ElementHandle"/></param> /// <param name="message">Optional failure message</param> /// <remarks><![CDATA[Elements: <button>, <input>, <keygen>, <select>, <textarea>]]></remarks> /// <returns>The <see cref="ElementHandle"/> for method chaining</returns> public static ElementHandle ShouldNotHaveFocus(this ElementHandle handle, string message = null) { if (handle.HasFocus()) { Throw.ShouldNotHaveFocus(handle, message); } return(handle); }