[
https://issues.jboss.org/browse/ARQGRA-329?page=com.atlassian.jira.plugin...
]
Oliver Kišš commented on ARQGRA-329:
------------------------------------
I think the elementary method of the validation API is {{checkValidity()}}, which could be
accessed through a new {{isValid()}} method in {{GrapheneElement}}:
{code}
@FindBy(id = "email")
GrapheneElement emailInput;
//Enter an incorrect email address
emailInput.sendKeys("john.doe@gma##$9d!!!");
//See if the email address passes validation
Assert.assertFalse("Email should be recognized as invalid",
emailInput.isValid());
//Or check validity of the entire form
Assert.assertFalse("Form validation should not pass",
registrationForm.isValid());
{code}
[{{validationMessage}}|http://www.whatwg.org/specs/web-apps/current-work/#dom-cva-validationmessage]
attribute could be used in similar way (a new method in {{GrapheneElement}}):
{code}
Assert.assertFalse("Email should be recognized as invalid: " +
emailInput.getValidationMessage(), emailInput.isValid());
{code}
[{{validity}}|http://www.whatwg.org/specs/web-apps/current-work/#dom-cva-validity]
attribute can provide more information about why validation failed, but I am not sure
about the best way to use it in Graphene.
Add support for HTML5 form validation API
-----------------------------------------
Key: ARQGRA-329
URL:
https://issues.jboss.org/browse/ARQGRA-329
Project: Arquillian Graphene
Issue Type: Feature Request
Components: core
Affects Versions: 2.0.0.Alpha4
Reporter: Oliver Kišš
Add support for using HTML5 [form validation
API|http://www.whatwg.org/specs/web-apps/current-work/#the-constraint-val...] from
Graphene, {{checkValidity()}} method in particular.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira