HTML5 allows the specifying of a "required" attribute for most input elements,
which triggers some client side validation by the browser (provided it supports
html5).
In cases where pages are supposed to take advantage of this if the browser
supports it, Watir users may need to validate if the element was defined with
the "required" attribute or not.
A simple .required? method that would return true if the attribute was defined,
false otherwise, would be useful to enable that sort of thing.
Also we might need to look at how .attribute("required") responds for input
elements since no value is provided, and a return of TRUE or FALSE would be
implied by the presence or abscence of the attribute.
INFO: to the extent we can trust them, 3wschools says this about the required
attribute for input elements
The required attribute is a boolean attribute.
When present, it specifies that an input field must be filled out before
submitting the form.
Note: The required attribute works with the following input types: text,
search, url, tel, email, password, date pickers, number, checkbox, radio, and
file.
---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir-webdriver/issues/189
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development