- On giving invalid data in the email field it prompts for an HTML 5 alert message.
- Firebug doesn't allow to inspect this error message (Please enter an email address) in two cases:
a. While inspecting with Firebug it is getting disappeared.
b. Right click on top of the error message doesn't work to inspect the element in DOM structure.
In Python:
http://selenium-python.readthedocs.io/api.html#module-selenium.webdriver.remote.webelement
The Selenium API doesn't support directly a required field. However, you can easily get the state and the message with a piece of JavaScript (Java):
Note that it's also possible to use
getAttribute
to get thevalidationMessage
even though it's a property:You get all html5 required field validation in this way.