Summary : Link is not getting open in new tab.
Here is my code with the real url :-
WebDriver driver = new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.navigate().to("https://us.justdial.com/NY/New-York/Afghani-Restaurants/ct-16110200");
WebElement rightclickelement = driver.findElement(By.xpath("/html/body/div[1]/div[1]/div/section/div[5]/div[2]/div[2]/ul/li[1]/div/div[2]/h2/a"));
Actions action = new Actions(driver);
action.moveToElement(rightclickelement);
action.contextClick(rightclickelement).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.ENTER).build().perform();
Expected : Link should get open in new tab.
Actual : Link gets open in current tab instead of new tab.
First off, uninstall the existing Fire fox and delete the profile and then install the ESR version of Firefox, ESR version is must! To get the ESR version, simply type Firefox ESR in your google, that will pave the way for you to installation file.
Here is the code