title: Selenium - webdriver can find element but click action is not performed
body: <p>I am trying to automate functional testing of a web application using Selenium webdriver and Java.
  In the AUT, there is a 'Submit' button defined by the following html code</p>
  
  <pre><code>&lt;button id="submitbtn" class="btn btn-primary" type="submit"&gt;Submit&lt;/button&gt;
  </code></pre>
  
  <p>I use the following command to click the button.</p>
  
  <pre><code>driver.findElement(By.id("submitbtn")).click();
  </code></pre>
  
  <p>When I run the code, the webdriver can find the button but the click action is not performed (I can understand that webdriver can find the button because no exception is thrown and the I can see a selection on the button when the code is run). I tried different waits</p>
  
  <pre><code>new WebDriverWait(driver,60).until(ExpectedConditions.elementToBeClickable(driver.findElement(By.id("submitbtn"));
  </code></pre>
  
  <p>but not getting any positive result. If I use,</p>
  
  <pre><code>Thread.sleep(3000);
  </code></pre>
  
  <p>it works fine (but I want to avoid this code). I tried all other types of waits and action class, </p>
  
  <pre><code>Actions action=new Actions(driver);
  action.moveToElement(driver.findElement(By.id("submitbtn"));
  wait.until(ExpectedConditions.elementToBeClickable(driver.findElement(By.id("submitbtn")));
  action.click().perform();
  </code></pre>
  
  <p>but no luck. Is there any way to achieve this?</p>