title: selenium test running twice for every @Test
body: <p>I set up a super simple maven project in IntelliJ to work with Selenium. </p>
  
  <p>POM.xml</p>
  
  <pre><code>    &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
              &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
              &lt;version&gt;2.48.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.11&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
              &lt;type&gt;jar&lt;/type&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
      &lt;/properties&gt;
  </code></pre>
  
  <p>Test file: </p>
  
  <pre><code>import org.junit.Test;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.firefox.FirefoxDriver;
  
  public class SeleniumHQTest {
      @Test
      public void testTabsExist() {
          WebDriver driver = new FirefoxDriver();
          driver.get(HomePage.googleURL);
          driver.quit();
      }
  }
  </code></pre>
  
  <p>The first browser opens google.com and closes. Then a second firefox opens and I get the following error:</p>
  
  <pre><code>org.openqa.selenium.WebDriverException: Session not found: 476bea76-a0cb-1e4f-9dcf-54dc6f16f674
  Command duration or timeout: 2.98 seconds
  Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
  System info: host: 'upkarmac.usca.ibm.com', ip: '9.72.139.142', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.5', java.version: '1.8.0_66'
  Driver info: org.openqa.selenium.firefox.FirefoxDriver
  Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=38.4.0, platform=MAC, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
  Session ID: 476bea76-a0cb-1e4f-9dcf-54dc6f16f674
  
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:647)
      at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:311)
      at com.ibm.paq.testpaq.SeleniumHQTest.testTabsExist(SeleniumHQTest.java:13)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      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.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.runner.JUnitCore.run(JUnitCore.java:160)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
  Caused by: org.openqa.selenium.WebDriverException: Session not found: 476bea76-a0cb-1e4f-9dcf-54dc6f16f674
  Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
  System info: host: 'upkarmac.usca.ibm.com', ip: '9.72.139.142', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.5', java.version: '1.8.0_66'
  Driver info: driver.version: unknown
      at &lt;anonymous class&gt;.nsCommandProcessor.prototype.execute(file:///var/folders/ld/s22xdgzj16d2l9zs8r5x8vn80000gn/T/anonymous8756482500413886703webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12577)
      at &lt;anonymous class&gt;.Dispatcher.executeAs/&lt;(file:///var/folders/ld/s22xdgzj16d2l9zs8r5x8vn80000gn/T/anonymous8756482500413886703webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:9455)
      at &lt;anonymous class&gt;.Resource.prototype.handle(file:///var/folders/ld/s22xdgzj16d2l9zs8r5x8vn80000gn/T/anonymous8756482500413886703webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:9602)
      at &lt;anonymous class&gt;.Dispatcher.prototype.dispatch(file:///var/folders/ld/s22xdgzj16d2l9zs8r5x8vn80000gn/T/anonymous8756482500413886703webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:9549)
      at &lt;anonymous class&gt;.WebDriverServer/&lt;.handle(file:///var/folders/ld/s22xdgzj16d2l9zs8r5x8vn80000gn/T/anonymous8756482500413886703webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:12390)
      at &lt;anonymous class&gt;.createHandlerFunc/&lt;(file:///var/folders/ld/s22xdgzj16d2l9zs8r5x8vn80000gn/T/anonymous8756482500413886703webdriver-profile/extensions/fxdriver@googlecode.com/components/httpd.js:2054)
      at &lt;anonymous class&gt;.ServerHandler.prototype.handleResponse(file:///var/folders/ld/s22xdgzj16d2l9zs8r5x8vn80000gn/T/anonymous8756482500413886703webdriver-profile/extensions/fxdriver@googlecode.com/components/httpd.js:2387)
      at &lt;anonymous class&gt;.Connection.prototype.process(file:///var/folders/ld/s22xdgzj16d2l9zs8r5x8vn80000gn/T/anonymous8756482500413886703webdriver-profile/extensions/fxdriver@googlecode.com/components/httpd.js:1223)
      at &lt;anonymous class&gt;.RequestReader.prototype._handleResponse(file:///var/folders/ld/s22xdgzj16d2l9zs8r5x8vn80000gn/T/anonymous8756482500413886703webdriver-profile/extensions/fxdriver@googlecode.com/components/httpd.js:1677)
      at &lt;anonymous class&gt;.RequestReader.prototype._processBody(file:///var/folders/ld/s22xdgzj16d2l9zs8r5x8vn80000gn/T/anonymous8756482500413886703webdriver-profile/extensions/fxdriver@googlecode.com/components/httpd.js:1525)
      at &lt;anonymous class&gt;.RequestReader.prototype.onInputStreamReady(file:///var/folders/ld/s22xdgzj16d2l9zs8r5x8vn80000gn/T/anonymous8756482500413886703webdriver-profile/extensions/fxdriver@googlecode.com/components/httpd.js:1393)
  </code></pre>