How to open a new tab in the existing Firefox browser using Selenium WebDriver (a.k.a. Selenium 2)?
*JAVA
I recommend to using JavascriptExecutor
:
((JavascriptExecutor) driver).executeScript("window.open()");
((JavascriptExecutor) driver).executeScript("window.open('https://google.com')");
Following import:
import org.openqa.selenium.JavascriptExecutor;