RE: How to open new tab in chromedriver? The following code is not working for chrome driver. Any other ways


Add Comment
4 Answers

Hi amit,
Thanks for your reply.
UsingĀ  “Actions” is not working for my code. TheĀ  following line is working with firefox driver not with chrome driver.


I used the following javascript code to open the new tab

JavascriptExecutor jse = (JavascriptExecutor)browser.getDriver();
jse.executeScript(“var w =;;”);

It worked. The problem here is even after i switch the control to new tab (driver.switchto().window(“new tab handle”)) , the actions are happening in my old tab.. any specific reasons??

Default Answered on March 13, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.