我尝试了这个,但是没用
WebElement ele= driver.findElement(By.xpath(".//*[@id='navbarTogglerDemo03']/ul/li[4]/a"));
Actions act=new Actions(driver);
act.moveToElement(driver.findElement(By.className("dropdown-toggle"))).click().build().perform();