public void reset(String baseUrl) {
   LOGGER.debug("resetting frame group");
   if (proxyInjectionMode) {
     // shut down all but the primary top level connection
     List<FrameAddress> newOrphans = new LinkedList<FrameAddress>();
     for (String uniqueId : uniqueIdToCommandQueue.keySet()) {
       CommandQueue q = getCommandQueue(uniqueId);
       FrameAddress frameAddress = q.getFrameAddress();
       if (frameAddress.getLocalFrameAddress().equals(DEFAULT_LOCAL_FRAME_ADDRESS)
           && frameAddress.getWindowName().equals(DEFAULT_SELENIUM_WINDOW_NAME)) {
         continue;
       }
       if (frameAddress.getLocalFrameAddress().equals(DEFAULT_LOCAL_FRAME_ADDRESS)) {
         if (LOGGER.isDebugEnabled()) {
           LOGGER.debug("Trying to close " + frameAddress);
         }
         try {
           q.doCommandWithoutWaitingForAResponse("close", "", "");
         } catch (WindowClosedException e) {
           LOGGER.debug("Window was already closed");
         }
       }
       orphanedQueues.add(q);
       newOrphans.add(frameAddress);
     }
     for (FrameAddress frameAddress : newOrphans) {
       uniqueIdToCommandQueue.remove(frameAddress);
     }
   }
   removeTemporaryFiles();
   selectWindow(DEFAULT_SELENIUM_WINDOW_NAME);
   // String defaultUrl = "http://localhost:"
   StringBuilder openUrl = new StringBuilder();
   if (proxyInjectionMode) {
     openUrl.append("http://localhost:");
     openUrl.append(portDriversShouldContact);
     openUrl.append("/selenium-server/core/InjectedRemoteRunner.html");
   } else {
     openUrl.append(LauncherUtils.stripStartURL(baseUrl));
   }
   try {
     doCommand("open", openUrl.toString(), ""); // will close out subframes
   } catch (RemoteCommandException rce) {
     LOGGER.debug("RemoteCommandException in reset: " + rce.getMessage());
   }
 }