I am looking to simulate a middle button mouse click on a text URL within a webpage using Selenium code in JavaScript so that it opens in a new tab.
Here's an example:
await driver.get("https://google.com");
// This is the xpath for the 'terms' text URL
await driver.findElement(By.xpath('/html/body/div[1]/div[5]/div[2]/div[2]/a[2]')).click();