How to Check and Confirm Web element is not available in the webpage?
<p>I'm having one action button and this action button will give any of 2 results based on the input Condition. If the Invalid data is provided, then some validation error will be thrown in message table and If valid data is provided, then message table will not exist and it will open another section i.e Message table will be displayed only for the Invalid Data input and it will not be displayed for the Valid Data.</p>

<p>Code:</p>

<pre><code> driver.findElement(By.name("MessageTable")).isDisplayed()
</code></pre>

<p>If the Valid data is entered, then message table section will not be displayed and hence, getting an error as </p>

<pre><code>"no such element: Unable to locate element: 
{"method":"name","selector":"MessageTable"}". for the above code.
</code></pre>

<p>How should I confirm message table is not present in the webpage?</p>