title: xpath click fails in Chrome
body: <p>I tried using xpaths obtained from xPathsOnClick Chrome extension. Neither worked in Chrome</p>
  
  <pre><code>/html/body/div[@id='content']/section[@id='landing']/button[@class='wide'] 
  //section[@id='landing']/button[@class='wide'] 
  
  System.out.println("clicking xpath");
  driver.findElement(By.xpath("//section[@id='landing']/button[@class='wide']")).click();
  Thread.sleep(2000);
  System.out.println("clicking xpath again");    
  driver.findElement(By.xpath("//section[@id='landing']/button[@class='wide']")).click();
  Thread.sleep(2000);    
  </code></pre>
  
  <p>I then tried to generate a script by recording clicks in FireFox using Selenium IDE, which recorded this click. This works when I run the selenium script using the FireFox Driver in my JUNIT4 test, but fails when I use ChromeDriver:</p>
  
  <pre><code>driver.findElement(By.cssSelector("button.wide")).click();
  </code></pre>
  
  <p>But I need to run my test in Chrome. What could be causing my script to fail in Chrome but not in FireFox?</p>
  
  <p>Here is my stack trace that is returned when this errors. </p>
  
  <pre><code>org.openqa.selenium.NoSuchElementException: no such element
    (Session info: chrome=32.0.1700.102)
    (Driver info: chromedriver=2.8.241036,platform=Mac OS X 10.9.1 x86_64) (WARNING: The server did not provide any stacktrace information)
  Command duration or timeout: 30.04 seconds
  For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
  Build info: version: '2.37.1', revision: 'a7c61cbd68657e133ae96672cf995890bad2ee42', time: '2013-10-21 09:08:07'
  System info: host: 'xxxxxxxxxxxx.local', ip: 'xxxxxxxx', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.1', java.version: '1.7.0_40'
  Session ID: 80610629a5bacb30e815dacc5077693a
  Driver info: org.openqa.selenium.chrome.ChromeDriver
  Capabilities [{platform=MAC, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={userDataDir=/var/folders/0n/n2fztz7x2ssdk6fncrw2csk02pm9vz/T/.org.chromium.Chromium.AHvKDM}, rotatable=false, locationContextEnabled=true, version=32.0.1700.102, takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, webStorageEnabled=true, nativeEvents=true, applicationCacheEnabled=false, takesScreenshot=true}]
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
      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.RemoteWebDriver.findElement(RemoteWebDriver.java:307)
      at org.openqa.selenium.remote.RemoteWebDriver.findElementByCssSelector(RemoteWebDriver.java:396)
      at org.openqa.selenium.By$ByCssSelector.findElement(By.java:431)
      at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:299)
      at com.thelathe.FactorTrack_selenium.testFactorTrack(FactorTrack_selenium.java:31)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      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.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.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>
  
  <p>I put a Thread.sleep(5000) immediately in front of the click method but it still errors with the same message</p>
  
  <pre><code>Thread.sleep(5000);          
  driver.findElement(By.xpath("//section[@id='landing']/button[@class='wide']")).click();
  Thread.sleep(2000);
  </code></pre>