Selenium WebDriver (Java) : Handle Field Validation Message
<p>How to handle this kind of pop-up. My goal is to get the message when Submit button clicked then validate it againts my own text (maybe using assert). I've tried to locate the element using firepath (xpath) but when i click locate Element button on firebug, the pop-up disappear.</p>

<p>Here is the screenshot of the pop-up.</p>

<p><a href="https://i.stack.imgur.com/tOPFE.png" rel="nofollow noreferrer">popUp</a></p>

<p>Here is the code :</p>

<pre><code>&lt;p class="errors"&gt;&lt;/p&gt;
&lt;input id="email" class="form-control" type="email" value="" name="email" required="" oninput="setCustomValidity('')" oninvalid="this.setCustomValidity('Email Cannot Be Empty')" placeholder="Email *" data-placeholder="X" data-format=""&gt;
</code></pre>

<p>Thank you in advance.</p>