I am using
((JavascriptExecutor) driver).executeScript("window.open();");
to open a new tab. It works fine in Chrome using selenium driver but not in IE, any suggestions? Thanks
Have tried this also: but no luck
((JavascriptExecutor) driver).executeScript("window.open('http://www.google.com','_blank');");
Answering if anyone gets the same issues
Step 1:
Internet Options > General Tab > Click on Settings > Click on Tabs > Select When Pop-up is encountered to Always open pop-ups in a new tab
Step 2:
Now go to Privacy and Add website to allow popups from
There is no guarantee that manually opening a new window with JavaScript in the IE driver will work. In particular, you may be able to get a new top-level browsing context (tab or window) to open, but there is no guarantee that the IE driver will be able to control the resulting new tab or window. Whenever anyone asks, "How do I open a new [tab|window] using WebDriver," it's always useful to drill down on why they think such an operation is necessary.