title: Selenium 2: Store webdriver instance id of open window to create new webdriver instance with this id
body: <p>This question is about the Java API of Selenium 2 RC2, used with Firefox 4.</p>
  
  <p>Let's say i have a <code>WebDriver</code> instance open and made some interactions in that browser window, like opening a URL, clicking on a link and filling out a form.</p>
  
  <p>Is it possible to create a new <code>WebDriver</code> instance which uses the already open window? Something like this (pseudo code):</p>
  
  <pre><code>WebDriver webDriver1 = new FireFoxWebDriver();
  webDriver.doSomeStuff();
  String webDriverInstanceId = webDriver.getId();
  
  WebDriver webDriver2 = new FireFoxWebDriver(webDriverInstanceId);
  webDriver.continueDoingMoreStuffInSameWindow();
  </code></pre>