I am trying to find a link in the page and open it in a new tab and for some reason this isn't working (fyi - My config details are given a the end of the message)
For instance, just open
google.com and try to click 'Images' link at the top right and open it in a new tab with the code something like below:
------------------
driver.get(baseUrl);
//Tried below 2 options, but none seems to be launching the Images in the new tab
driver.findElement(By.xpath("//a[text()='Images']")).sendKeys(Keys.CONTROL + "t");
driver.findElement(By.xpath("//a[text()='Images']")).sendKeys(Keys.chord(Keys.CONTROL, "t"));
//Even a simple create new tab using below is not working
new Actions(driver).sendKeys(Keys.chord(Keys.CONTROL,"t")).build().perform();
------------------
My config:
WebDriver version: 3.4.0
Chrome Driver: 2.3.3
OS: Windows 7 professional
IDE/Language: Eclipse/Java
Any pointers on getting this to work is much appreciated. Thanks!