How to open a new tab in the existing Firefox browser using Selenium WebDriver (a.k.a. Selenium 2)?
driver.findElement(By.cssSelector("body")).sendKeys(Keys.CONTROL +"t"); ArrayList tabs = new ArrayList (driver.getWindowHandles()); driver.switchTo().window(tabs.get(0));