@Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { Mouse mouse = ((HasInputDevices) driver).getMouse(); ContextClickAction rightClick = new ContextClickAction(mouse, (Locatable) (driver.findElement(By.xpath(locator)))); rightClick.perform(); return null; }