在the应用程序的HTML中有以下代码
<input type="text" name="prettyTime" id="prettyTime" class="ui-state-disabled prettyTime" readonly="readonly">
页面上实际显示的是一个显示时间的字符串。
在Selenium Web Driver中,我有一个引用<input>
的WebElement
对象
WebElement timeStamp = waitForElement(By.id("prettyTime"));
我想获取WebElement
的值,换句话说,就是页面上打印的内容。我尝试了所有的WebElement
获取方法,但是没有检索到用户看到的实际值。有什么帮助吗?谢谢。
https://stackoverflow.com/questions/7852287
复制相似问题