How to Open a New Tab in Browser Using Selenium WebDriver with Java Updated: December 2, 2018 - Amir Ghahrai Quite often you may want to open a new tab in the same browser window that is running your Selenium WebDriver tests. Hi Selenium-users, I'm not able to open new tab using chrome driver on mac. Chrome driver vesrion: 2.19 and chrome version 45.0.2454.99 (64-bit).
- Selenium Chromedriver Open Manual Url In New Tab Mac Word
- Selenium Chromedriver Open Manual Url In New Tab Mac Shortcut
- Selenium Chromedriver Open Manual Url In New Tab Mac Free
8 Answers
I checked with below code and it works fine for me. I found answer from here.
Abdul HameedAbdul Hameedthis below code works for me in Selenium 3 and chrome version 58.
I have tried other techniques, but none of them worked, also no error produced, but when I have used the code below, it worked for me.

First open empty new Tab by using the keys Ctrl + t and then use .get() to fetch the URL you want. Your code should look something like this -
If you want to open a link on the current view in a new tab then the code you've written above can be used. Instead of By.linkText() make sure you use the appropriate By selector class to select the web element.
Selenium Chromedriver Open Manual Url In New Tab Mac Word
JRodDynamiteI had used the below code to open a new tab in the browser using C# selenium..
StyxSelenium Chromedriver Open Manual Url In New Tab Mac Shortcut
If you can get the link element you can use this. It will also take you to the tab that you have opened.
Selenium can only automate on the WebElements of the browser. Opening a new tab is an operation performed on the webBrowser which is a stand alone application. For doing this you can make use of the Robot class from the java.util.* package which can perform operations using the keyboard regardless of what type of application it is. So here's the code for your operation.Note that you cannot automate stand alone applications using the Robot class but you can perform keyboard or mouse operations
After this step you will need a window iterator to switch to the new tab:

You can open multiple browser or a window by using below code:
Selenium Chromedriver Open Manual Url In New Tab Mac Free
Rabbid76protected by Community♦Aug 24 '18 at 16:03
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?