How to check if a web element does not have another inner web element
<p>I am using Selenium and Java to write a test, I need to check if a web element does not have another web element inside it, for example:</p>

<pre><code>&lt;div&gt;&lt;span&gt;bla bla&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;g&gt;&lt;/g&gt;&lt;/div&gt;
&lt;div&gt;&lt;li&gt;&lt;/li&gt;&lt;/div&gt;
</code></pre>

<p>I need to select the <code>div</code> tags which does not have <code>&lt;span&gt;</code> inside them, so do we have something like:</p>

<pre><code>//div[not(.//span[text()='bla bla'])]
</code></pre>

<p>Please do not tell me how to do it in other ways as I already know, I am just wondering if I can do it in a way like the one above.</p>