方法一:获取input的文本值
![](https://img.haomeiwen.com/i3265068/d070de14e1471a06.png)
chrome.findElement( By.id("txtName") ).getText();
方法二:获取input中value的值
![](https://img.haomeiwen.com/i3265068/f41fc102ff78c92f.png)
chrome.findElement(By.id("txtName") ).getAttribute("value") ;
方法一:获取input的文本值
chrome.findElement( By.id("txtName") ).getText();
方法二:获取input中value的值
chrome.findElement(By.id("txtName") ).getAttribute("value") ;
本文标题: selenium 获取input输入框中的值的方法
本文链接:https://www.haomeiwen.com/subject/wigfnttx.html
网友评论