title: How to check if the button is clickable using selenium webdriver
body: <p>I am trying to find if the button element is clickable which I am not able to validate successfully using selenium webdriver. </p>
  
  <p>Here is my code to validate if the element is clickable </p>
  
  <pre><code>    boolean installAFile;
  
      String classValues = driver.findElement(by.XPATH("//button[contains(., 'Install a new file')]")).getAttribute("class");
      installAFIle = classValues.contains("iconbutton-button--clickable");
  
      return installAFIle;
  </code></pre>
  
  <p>Here is the HTML </p>
  
  <pre><code>&lt;div&gt;
  &lt;!-- react-text: 406 --&gt;
  test message 1
  &lt;!-- /react-text --&gt;
  &lt;div class="iconbutton"&gt;
  &lt;button class="iconbutton-button iconbutton-button--clickable" type="button" 
  tabindex="0"&gt;
  &lt;div class="iconbutton-button-label"&gt;Install a new file&lt;/div&gt;
  &lt;/button&gt;
  &lt;/div&gt;
  &lt;!-- react-text: 410 --&gt;
  under File &gt; Install.
  &lt;!-- /react-text --&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I keep on getting following validation message:
  <strong>no such element: Unable to locate element: {"method":"xpath","selector":"//button[contains(., 'Install a new file')]"}</strong></p>