コード例 #1
0
        /// <summary>
        /// Asserts that the element does not have the specified attribute.
        /// </summary>
        /// <param name="handle">An <see cref="ElementHandle"/></param>
        /// <param name="name">The attribute name</param>
        /// <param name="message">Optional failure message</param>
        /// <returns>The <see cref="ElementHandle"/> for method chaining</returns>
        public static ElementHandle ShouldNotHaveAttribute(this ElementHandle handle, string name, string message = null)
        {
            if (handle.HasAttribute(name))
            {
                Throw.ShouldNotHaveAttribute(handle, message);
            }

            return(handle);
        }