I have a modal dialog (bootstrap modal-content
) with a form on it.
The form has a field for an email:
<input class="form-control" data-error="Email address is invalid" required="required" id="email_to_forward" name="email_to_forward" placeholder="Enter email" type="email">
The form also has a button:
<button type="submit" class="btn btn-primary" id="forward" name="forward" value="forward">Forward</button>
The expected behavior is as follows:
- Given I enter an invalid email address
- When I click submit
- Then the dialog should remain visible
This works as expected if I do a manual test.
This works as expected if I run the automation using the Firefox selenium driver.
This does not work if I use poltergeist with PhantomJS. As soon as it clicks the submit button, the dialog is no longer visible.
Does PhantomJS and Poltergeist support HTML5 validation?