title: Selenium: submit() works fine, but click() does not
body: <p>I have submit button, which is only one on the page, and it's in form. </p>
  
  <p>html part:</p>
  
  <pre><code>&lt;form class="search-form ng-touched ng-dirty ng-valid" novalidate="" style="" xpath="1"&gt;
  
  &lt;div class="row"&gt;...&lt;/div&gt;
  &lt;div class="row"&gt;...&lt;/div&gt;
  &lt;div class="row"&gt;...&lt;/div&gt;
  &lt;div class="form__actions" xpath="1"&gt;
      &lt;div class="form__buttons"&gt;
        &lt;!----&gt;
        &lt;div class="btn__wrapper"&gt;
          &lt;button class="btn btn__primary" type="submit"&gt;
            Select My Car
          &lt;/button&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>So, I'm taking xpath:</p>
  
  <pre><code>//button[@type='submit']
  </code></pre>
  
  <p>I'm successfully pressing it via submit() (let me skip WebDriver init, its fine):</p>
  
  <pre><code>  WebElement searchButton = driver.findElement(By.xpath("//button[@type='submit']"));
    searchButton.submit();
  </code></pre>
  
  <p>(and some search performs)</p>
  
  <p>But when I'm trying to press it via click()</p>
  
  <pre><code>WebElement searchButton = driver.findElement(By.xpath("//button[@type='submit']"));
          searchButton.click();
  </code></pre>
  
  <p>it's not pressed in browser which is launched, and same time Junit test is green (not test, but just pressing button):</p>
  
  <pre><code>@Test
      public void test() {
          WebElement button = driver.findElement(By.xpath("//button[@type='submit']"));
          button.click();
      }
  </code></pre>
  
  <p>Can please someone explain, why submit() successfully presses button in such case, but click() - no. And I do not understand, why "test" is green, when we are trying to click(), but it was not performed, if looking on browser launched by driver.</p>
  
  <p><strong>UPDATED:</strong>
  I tried </p>
  
  <pre><code>WebElement button = driver.findElement(By.xpath("//button[@type='submit']"));
          if (button.isEnabled()) {
              button.click();
          }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>WebDriverWait wait = new WebDriverWait(driver, 10);
          wait.until(ExpectedConditions.elementToBeClickable(button)).click();
  </code></pre>
  
  <p>but still the same - submit() works fine, click() - does not.</p>