Open link in a new tab using Chrome Browser + Selenium Java

Actions action = new Actions(driver);
WebElement link = driver.findElement(By.linkText("Gmail")); action.moveToElement(link).keyDown(Keys.CONTROL).click(link).build().perform();


Note:
For windows, this is Keys.CONTROL
For Mac, this is Keys.COMMAND