Selenium ChromeDriver switch tabs

This is what worked for me:

var popup = driver.WindowHandles[1]; // handler for the new tab
Assert.IsTrue(!string.IsNullOrEmpty(popup)); // tab was opened
Assert.AreEqual(driver.SwitchTo().Window(popup).Url, "http://blah"); // url is OK  
driver.SwitchTo().Window(driver.WindowHandles[1]).Close(); // close the tab
driver.SwitchTo().Window(driver.WindowHandles[0]); // get back to the main window

As mentioned in my comment on your post, I'm not sure if the Chrome driver handles tabs the same way as it handles windows.

This code works in Firefox when opening new windows, so hopefully it works in your case as well:

public void SwitchToWindow(Expression<Func<IWebDriver, bool>> predicateExp)
{
    var predicate = predicateExp.Compile();
    foreach (var handle in driver.WindowHandles)
    {
        driver.SwitchTo().Window(handle);
        if (predicate(driver))
        {
            return;
        }
    }

    throw new ArgumentException(string.Format("Unable to find window with condition: '{0}'", predicateExp.Body));
}

SwitchToWindow(driver => driver.Title == "Title of your new tab");

(I hope my edits to the code for this answer didn't introduce any errors...)

Just make sure you don't start looking for the new tab before Chrome has had the chance to open it :)