我的代码是
String OTP = driver.findElement(By.xpath("//span[@id='otp']")).getAttribute("value"); System.out.println(OTP);
selenium-webdriver
selenium-webdriver ×1