I am using IE11 for my selenium tests. I Am clicking on a link which when done manually opens up the link on a new tab. When I am trying to do the same thing with Selenium, it does not open the link on a new tab rather, it opens up on a new window.
Is there a way to force IE to click and open the link on a new tab?
I am able to achieve the same with Firefox and Chrome, but with IE, as soon as the link is clicked, it opens on a new window rather than a new tab.
if (BROWSER_TYPE.equals("IE")) {
Utility.log(this.getClass().getName(),Level.INFO,"Browser type is IE downloading firefox driver is required.");
WebDriverManager webDriverManagerObject = WebDriverManager.iedriver();
webDriverManagerObject.targetPath(DRIVER_DOWNLOAD_PATH);
if(!DRIVER_VERSION.equals("latest")) {
WebDriverManagerObject = webDriverManagerObject.version(DRIVER_VERSION);
}
Utility.log(this.getClass().getName(),Level.DEBUG,"Launching IE Browser");
webDriverManagerObject.setup();
driver = new InternetExplorerDriver();
}
Expected Result: Clicking on the Link should open the page on a new tab on the same window in IE
Actual result: Clicking on the Link opens the page on a new window rather than a new tab.