static void Main()
{
IWebDriver driver = new ChromeDriver();
driver.Navigate().GoToUrl(\"http://google.com\");
IWebElement body = driver.FindElement(By.T
Looks like it's a "feature" of the chrome driver.
https://bugs.chromium.org/p/chromedriver/issues/detail?id=581
This is a limitation in the way we simulate keyboard input in ChromeDriver. Keys get sent directly to the render process, bypassing the browser process. So any keyboard shortcut handlers in the browser process will not be invoked by sendKeys().
Thanks for the answers! I did it with JavaScript.
((IJavaScriptExecutor)driver).ExecuteScript("window.open();");
Try this
driver.FindElement(By.CssSelector("body")).SendKeys(Keys.Control + "t");
driver.SwitchTo().Window(driver.WindowHandles.Last());
driver.Navigate().GoToUrl("http://www.google.com")
If your on a mac, use Keys.Command instead of Keys.Control:
body.SendKeys(Keys.Command + "t");