i want to inspect span class element using Selenium using other Selenium attributes than Xpath
<p>  Please enter your password</p>

<p>i want to get the message "Please enter your password"</p>

<p>Is there any other attribute than Xpath?</p>

<p>The code appears like this:</p>

<pre><code>&lt;span class="k-widget k-tooltip k-tooltip-validation k-invalid-msg" data-for="password" role="alert"&gt;&lt;span class="k-icon k-warning"&gt; &lt;/span&gt; Please enter your password&lt;/span&gt;
</code></pre>

<p>Thanks</p>