title: How to getText from a disabled input field in Selenium Java
body: <p>How can I get text from a disabled input field in Selenium Java?</p>
  <p>Below is the HTML tag.</p>
  <pre><code>&lt;input id=&quot;endDate&quot; class=&quot;ng-pristine ng-untouched ng-valid ng-valid-maxlength&quot; data-ng-disabled=&quot;dateRange!=='Cm'&quot; size=&quot;10&quot; maxlength=&quot;10&quot; data-ng-model=&quot;endDate&quot; validate-date=&quot;&quot; name=&quot;endDate&quot; disabled=&quot;&quot;/&gt;
  </code></pre>
  <p>I'm looking for Selenium Java code to get the text value from that disabled input field.</p>
  <p>I tried <code>getAttribute(&quot;disabled&quot;)</code>. But it is returning true. I tried <code>WebElement.getAttribute(&quot;id&quot;)</code>, but it is returning null value. None of it worked.</p>
  <p>The value of that field will be generated dynamically. For example, if I select today the values will be populated as <code>SYSDATE</code>. For the yesterday value will be <code>SYSDATE-1</code>.</p>