Extract DOM property value using Selenium
<p>In Firebug and other DevTools you can get the DOM properties and values corresponding to an HTML element.</p>

<p>How can such values be extracted using selenium-java code?
I had tried <code>getAttribute()</code>, but it seems to be working only for HTML attributes and not for DOM properties like "value" or "spellcheck" etc.</p>

<p>The reason I went for this approach is that the value associated with the <code>&lt;input&gt;</code> text field (snippet below) is run-time generated and data is bound to it using Knockout. And hence it's not possible to capture them with standard approaches like <code>getText()</code>, <code>getAttribute("value")</code>, <code>getAttribute("text")</code>, <code>getAttribute("innerHTML")</code>,  <code>getAttribute("innertext")</code>, etc.</p>

<p>HTML snippet for the HTML element:</p>

<pre><code>&lt;input class="form-control" type="text" style="cursor: text" readonly="readonly" data-bind="textInput: url"&gt;
</code></pre>

<p><a href="https://i.stack.imgur.com/bl66j.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bl66j.png" alt="Firebug&#39;s DOM panel displaying DOM properties of an &lt;input&gt; element"></a></p>