I have a modal dialog (bootstrap modal-content ) with a form on it.
The form has an email field:
<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:
- To enter an invalid email address
- When i click submit
- Then the dialogue should remain visible.
This works as expected if I go through manually.
This works as expected if I started the automation using the selenium Firefox driver.
This does not work if I use poltergeist with PhantomJS. As soon as he presses the submit button, the dialogue is no longer displayed.
Does PhantomJS and Poltergeist support HTML5 validation?
Daryn source share