title: selenium, how can I select new window
body: <p>I run my selenium rc test in Eclipse with TestNG. I have a link which tries to open a new browser page. How can I select this new page to operate in? I use this code:</p>
  
  <p><code>selenium.selectWindow("name=NewPage");</code> </p>
  
  <p>however it says page not found. I also try to define page ids or titles with this code:</p>
  
  <pre><code>String[] wins = selenium.getAllWindowIds();
      for (String s : wins)
           System.out.println("win: " + s); 
  </code></pre>
  
  <p>It does not define my new opened window: </p>
  
  <pre><code>win: MainPage
  win: 
  </code></pre>
  
  <p>If use <code>selenium.getAllWindowNames()</code> I get <code>win: selenium_main_app_window
  win: selenium_blank65815</code>. </p>
  
  <p>I write this code <code>selenium.selectWindow("name=blank99157");</code>  but get the error - <code>ERROR: Window does not exist. If this looks like a Selenium bug, make sure to read http://seleniumhq.org/docs/02_selenium_ide.html#alerts-popups-and-multiple-windows for potential workarounds.</code></p>