You can use Actions class to perform this.
Actions act = new Actions(driver);
WebElement onElement = Your element on which action has to be performed;
act.contextClick(onElement).perform();
act.sendKeys("w").perform(); // If you want the link to open in new tab then use T instead of w
Hope this helps. Happy coding.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…