title: Selenium Chrome Driver not respecting implicit wait?
body: <p>Okay! So I am using the selenium chrome driver(32 bit) on windows 8.</p>
  
  <p>I have set the implicit wait as below:</p>
  
  <pre><code>DesiredCapabilities des=DesiredCapabilities.chrome();
  ChromeOptions options = new ChromeOptions();
  options.addArguments("window-size=1366,768");
  des.setCapability(ChromeOptions.CAPABILITY, options);
  dvr= new ChromeDriver(des);
      driver = new EventFiringWebDriver(dvr);
      driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
  </code></pre>
  
  <p>But at some point in my tests I am getting a staleElementException...as below:</p>
  
  <p>I am not too worried about the staleElementException, what bothers me is the below line in the exception: <strong>Command duration or timeout: 14 milliseconds</strong></p>
  
  <p><strong>When the timeout is already set to 30 Seconds implicitly</strong> then why am I getting the timeout of 14 milliseconds....Any suggestions or workaround will be appreaciate thanks!</p>
  
  <pre><code>public static WebElement grabElementByPureXPath(String xpath)
  {
      WebElement element = null;
      int attempts=1;
      try
      {
          while(attempts&lt;7)
          {
              try
              {
                  element=driver.findElement(By.xpath(xpath));
              }
              catch(StaleElementReferenceException e){}
                  attempts++;
          }
      }
      catch(Throwable t)
      {
          try
          {
              element=driver.findElement(By.cssSelector(xpath));
          }
          catch(Throwable T)
          {
              takeScreenShot(xpath);
              Assert.assertTrue(t.getMessage(),false);
          }
      }
  
      return element;
  }
  </code></pre>
  
  <p><strong>&lt;-----------------------The Exception Below---------------------------------------------></strong></p>
  
  <pre><code>org.openqa.selenium.StaleElementReferenceException: stale element reference: element   is not attached to the page document
    (Session info: chrome=29.0.1547.76)
    (Driver info: chromedriver=2.1,platform=Windows NT 6.2 x86_64) (WARNING: The server did not provide any stacktrace information)
  **Command duration or timeout: 14 milliseconds**
  For documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html
  Build info: version: '2.35.0', revision: 'c916b9d', time: '2013-08-12 15:42:01'
  System info: os.name: 'Windows 8', os.arch: 'amd64', os.version: '6.2', java.version: '1.7.0_25'
  Session ID: aee4999cb9dc120f7e17629cc1621d7d
  Driver info: org.openqa.selenium.chrome.ChromeDriver
  Capabilities [{platform=WIN8, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={chromedriverVersion=2.1}, rotatable=false, locationContextEnabled=true, version=29.0.1547.76, cssSelectorsEnabled=true, databaseEnabled=true, handlesAlerts=true, browserConnectionEnabled=false, webStorageEnabled=true, nativeEvents=true, applicationCacheEnabled=false, takesScreenshot=true}]
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
      at java.lang.reflect.Constructor.newInstance(Unknown Source)
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:191)
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
      at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:268)
      at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:79)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement$1.invoke(EventFiringWebDriver.java:327)
      at com.sun.proxy.$Proxy12.click(Unknown Source)
      at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.click(EventFiringWebDriver.java:340)
      at testCases.TC5663.test5663(TC5663.java:87)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      at org.junit.rules.Verifier$1.evaluate(Verifier.java:35)
      at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at org.junit.runners.Suite.runChild(Suite.java:127)
      at org.junit.runners.Suite.runChild(Suite.java:26)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
  </code></pre>
  
  <h2>/<strong><em>*</em>**<em>*</em>**<em>*</em>***<em></strong>---------------------<strong></em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>*</strong>/</h2>
  
  <hr>