this is my line to open the new tab
driver.findElement(By.cssSelector("body")).sendKeys(Keys.CONTROL +"t");
((JavascriptExecutor)driver).executeScript("window.open();");
This JavaScript code opens a new tab for the Chrome browser.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With