title: Opening a link in new window
body: <p>I need to open a link in a new window with Selenium.  I found the following 2 (assume we is the WebElement and I have already found it and myWait just performs a wait for x milliseconds):</p>
  
  <p>1)</p>
  
  <pre><code>Actions act = new Actions(driver);
  act.contextClick(we).perform();
  myWait(1000); // allow the menu to come up
  act.sendKeys(which).perform();
  </code></pre>
  
  <p>2)</p>
  
  <pre><code>we.sendKeys(Keys.CONTROL + "t");
  </code></pre>
  
  <p>In #1 I see the menu come up, but the <code>sendKeys</code> does not work (oh, by the way the "which" in sendKeys is a "t").  In #2 it simply ignores it.</p>
  
  <p>In #1 is the menu that comes up in a new window already?  Do I have to <code>driver.switchTo()</code>?  or if not, what am I doing wrong?</p>
  
  <p>Also, is there another way to do this?  we is an element of form <code>&lt;a href=blah&gt;</code> and a regular click opens fine.</p>