title: Checking if a button is disabled or not
body: <p>my issue i am having is that selenium is saying that the <strong>next arrow button</strong> is enabled when it is disabled/grayed out. what i am trying to do is this</p>
  
  <p>1 click next arrow button
  2 sleep for 5 seconds
  3 check if disabled
  4 click next arrow button
  5 check if disabled
  ( loop repeat steps 1 -5)
   if button is disabled break do while loop</p>
  
  <p>my code that is not working is below</p>
  
  <pre><code> PS_OBJ_CycleData.Nextbtn(driver).click();
   Thread.sleep(5000);
   WebElement element = driver.findElement(By.id("changeStartWeekGrid_next"));
   if (element.isEnabled()) {
    System.out.println("Good next arrow enabled");
   } else {
    System.out.println("next arrow disabled");
    PS_OBJ_CycleData.Cancelbtn(driver).click();
    break dowhileloop;
   }
  </code></pre>
  
  <p>my console output is "Good next arrow enabled" instead of going to the else statment.</p>
  
  <p>Button HTML is here</p>
  
  <pre><code>&lt;div id="changeStartWeekGrid_next" class="paginationButton" disabled="disabled" data-xpal="xpath-selected"&gt;
     &lt;a tabindex="0" href="#" id="changeStartWeekGrid_next_link" onclick="var registry = require('dijit/registry'); registry.byId('changeStartWeekGrid').next(); return false;"&gt;
     &lt;span class="icon-pagination-next"&gt;&lt;/span&gt;
     &lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>As you can see the button is actually disabled there another way to check is button is really disabled? Any help would be appreciated.</p>
  
  <p>this is an additional picture of the inspected element
  <a href="https://i.stack.imgur.com/piP1h.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/piP1h.png" alt="enter image description here"></a></p>