我很難用Selenium網絡驅動程序來查找下面的方案的標籤文本。使用硒webdriver找到標籤文本
<tr id="row">
<td width="148" height="22" align="left">
<b> Label Text</b>
</td> </tr>
如何使用webdriver獲取標籤文本?
在此先感謝。
感謝您的回覆。我想我應該更具體。我有一個tr標籤內的td標籤列表。 對於如:
<tr id="row">
<td width="148" height="22" align="left">
<b> Label Text 1</b>
<td width="148" height="22" align="left">
<b> Label Text 2</b>
<td width="148" height="22" align="left">
<b> Label Text 3</b>
</td> </tr>
driver.findElement(By.id( 「行」))的getText()將檢索我所有的標籤值的。我可以根據頁面中的位置獲取標籤值嗎?謝謝。
你已經在這裏問你的問題http://stackoverflow.com/questions/10095195/finding-label-text-when-id-does-not-exist?rq=1 – 2015-02-15 08:30:21