title: Selenium interrupt Explicit Wait
body: <p>I have a thread which execute commands like this: </p>
  
  <pre><code>WebDriverWait wait = new WebDriverWait(driver, waitSecs);
  wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(xPath))).click();
  </code></pre>
  
  <p>Sometimes I want to stop thread before to finish execution. But if thread wait for my Element, it will stop only after time expire(TimeoutException) or command is executed.</p>
  
  <p>There is a way to stop Explicit Wait? Like <code>Thread.interrupted()</code> with <code>Thread.sleep()</code>. Even if throw an exception.</p>