title: Getting stale element reference: element is not attached to the page document exception
body: <p>In my application, when i open the page,left hand side are displayed list of tabs.</p>
  
  <p>By default,one tab is opened status and other tabs are closed status,so i am looking to find the opened status tab class name and clicked the tab, it has closed,then had to give the another tab id to open.</p>
  
  <p>While executing the code,I am getting the <em>"stale element reference: element is not attached to the page document"</em> exception. </p>
  
  <p>I have tried with implicit wait option as well. </p>
  
  <p>Could any one please help on that issue to resolve?</p>
  
  <pre><code>driver.manage().timeouts().implicitlyWait(1000,TimeUnit.SECONDS);
  
                    WebElement element5 = driver.findElement(By.className("TopItemActive"));
                    if(element5.isEnabled())
                    {
                    element5.click();
                    }
  
                    driver.manage().timeouts().implicitlyWait(2000,TimeUnit.SECONDS);
                  WebElement element6 = driver.findElement(By.id("id_16_cell"));        
                  element6.click();
                  System.out.println("Tab opened");
  </code></pre>