So of course in internet explorer (9) I cannot get a link to open in a background tab. I've tried a few things :
Robot r = new Robot();
r.keyPress(KeyEvent.VK_CONTROL);
driver.findElement(By.name(THE_LINK)).click();
r.keyRelease(KeyEvent.VK_CONTROL);
I've also tried
String link = Keys.chord(Keys.CONTROL, Keys.RETURN);
driver.findElement(By.name(THE_LINK)).sendKeys(link);
It actually opens it in a new window.
When I'm working manually and ctrl+click it works as expected and opens in a background tab. I've tried resetting browser settings and doing a lot of different things but of course, it doesn't work as expected.
Anyone seen this before? Anyone got a different thing for me to try?