我有一个大致如下所示的 HTML 页面:
<div id="rolesRollerBody" style="height: 309px;">
<input type="checkbox" onclick="checkAll('removeRolesForm');" name="allbox">
Select all
<br><br>
<input type="checkbox" value="49893" name="delRole">
CCC11
<br>
<input type="checkbox" value="49881" name="delRole">
TEST111
<br><br>
</div>
我正在使用以下方法获取整个面板:
WebElement deletePanel = driver.findElement(By.className("bulkUpdateBody"))
.findElement(By.id("rolesRollerBody"));
现在我需要获取名为“TEST111”的复选框。问题是,我无法获得文本“TEST111”。