-3
我的HTML代碼來從TD元素的值:如何使用硒的webdriver
<tbody>
<tr style="display:none;">
<tr>
<td class="intervention">
<td class="notes-count">
<span class="ico ico--paper"></span>
2
</td>
現在我需要使用selenium webdriver
來獲取值「2」。請幫幫我。我已使用xpath "//div/table/tbody/tr[2]/td[2]/" and getattribute("value ")
但返回空值
如果您需要更多信息,請讓我知道。由於提前
我的HTML代碼:
某些代碼丟失。正確地發佈代碼。 – 2013-04-24 14:32:44
感謝Uma的評論。這是我的第一篇文章,我對發佈代碼的位置感到困惑 – Ramesh 2013-04-24 15:37:03
回答
那麼使用WebElement的的getText方法,而不是使用的getAttribute方法
Here就像是javadoc的API爲硒的webdriver
來源
2013-04-24 15:47:38 SatishJS
相關問題