title: Check whether a link is disabled using Selenium in Python?
body: <p>I need to check whether a link's disabled attribute is set, in the following code,</p>
  
  <pre><code>&lt;a id="ctl00_ContentPlaceHolder1_lbtnNext" disabled="disabled"&gt;Next&lt;/a&gt;
  </code></pre>
  
  <p>However on the last page if I execute,</p>
  
  <pre><code>next_pg=driver.find_element_by_xpath("//a[@id='ctl00_ContentPlaceHolder1_lbtnNext']")
  next_pg.click()
  print next_pg.is_enabled()
  </code></pre>
  
  <p>I get <strong><em>True</em></strong> as the output, which should not be the case.
  Also, only on the last page is the <strong><em>Next</em></strong> coded as given above, in all other pages it is coded as follows, due to which on checking the is_enabled() tag, an error is produced.</p>
  
  <pre><code>&lt;a id="ctl00_ContentPlaceHolder1_lbtnNext" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$lbtnNext','')"&gt;
  </code></pre>
  
  <p>How should I solve this?</p>