static WebElement element;
static JavascriptExecutor js;
static WebDriver driver;
element = driver.findElement(By.xpath(str));//str是你的xpath
js.executeScript("arguments[0].click();", element);
static WebElement element;
static JavascriptExecutor js;
static WebDriver driver;
element = driver.findElement(By.xpath(str));//str是你的xpath
js.executeScript("arguments[0].click();", element);