小编Suj*_*it 的帖子

getAttribute("value") 返回空值,为什么?

我的代码是

String OTP = driver.findElement(By.xpath("//span[@id='otp']")).getAttribute("value");
System.out.println(OTP);
Run Code Online (Sandbox Code Playgroud)

selenium-webdriver

5
推荐指数
1
解决办法
3529
查看次数

标签 统计

selenium-webdriver ×1