WebElement environmentalRegulations = wait.until(ExpectedConditions.presenceOfElementLocated(By.id("envRegulations")));
更改此行以指向
input
而不是 div,如下所示
WebElement environmentalRegulations = wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("#envRegulations input")));