title: element is not attached to the page document
body: <p>While clicking on javascript components Im getting:</p>
  
  <blockquote>
    <p>org.openqa.selenium.StaleElementReferenceException: stale element
    reference: element is not attached to the page document</p>
  </blockquote>
  
  <p>One way to fix it is to stop script for some short period of time with :
  Thread.sleep(200);</p>
  
  <p>I have my implicitlyWait set for 10 seconds, and I think there wasnt such problems with older selenium </p>
  
  <p>But is there any other way to do it globally ?</p>
  
  <pre><code>driver.findElement(By.cssSelector("button.btn.btn-default")).click();
  driver.findElement(By.xpath("//div[@id='content']/div/form")).click();
  driver.findElement(By.linkText("Order")).click();
  </code></pre>
  
  <p>But in the middle of this i have to put sleep's to make it work: </p>
  
  <pre><code>    driver.findElement(By.cssSelector("button.btn.btn-default")).click(); 
  Thread.sleep(200);
          driver.findElement(By.xpath("//div[@id='content']/div/form")).click(); 
  Thread.sleep(200);
          driver.findElement(By.linkText("Order")).click();
  </code></pre>