title: How to check if an input is disabled with JavaScript in Selenium
body: <p>I'm building and automated test script for a webapp using selenium and I'm trying to use the <a href="http://release.seleniumhq.org/selenium-remote-control/1.0-beta-2/doc/java/com/thoughtworks/selenium/Selenium.html#waitForCondition%28java.lang.String,%20java.lang.String%29" rel="noreferrer">waifForCondition</a> function of the API where it will wait until a JS script evaluates to <code>true</code>.</p>
  
  <p>I currently have this source on the page:</p>
  
  <pre><code>&lt;input id="modifyHostsForm:idDnsIp0_0" type="text" name="modifyHostsForm:idDnsIp0_0" readonly="" disabled=""&gt;
  </code></pre>
  
  <p>Which should change to:</p>
  
  <pre><code>&lt;input id="modifyHostsForm:idDnsIp0_0" type="text" name="modifyHostsForm:idDnsIp0_0"&gt;
  </code></pre>
  
  <p>As soon as I put a certain value on another field and fire the "blur" event on it (and this field thus becomes "enabled").</p>
  
  <p>And I'm trying to execute the following JS script to test when this field is enabled (basically what I found from "Googling"):</p>
  
  <pre><code>document.getElementbyId('modifyHostsForm:idDnsIp0_0').disabled == false
  </code></pre>
  
  <p>However I'm getting a <code>SeleniumException</code> which indicates that "Object doesn't support this property or method". What can I do here? Any help would be appreciated.</p>