这是我的代码
<tr>
<td>
<div>
<span>Cloud Email Security</span>
<input id="productLine_software-0" name="productLine_software" value="Cloud Email Security" type="hidden"/>
</div>
</td>
<td>
<div>
<span>Core</span>
<input id="productCategory_software-0" name="productCategory_software" value="Core" type="hidden"/>
</div>
</td>
<td>
<div>
<span>Cloud Antispam</span>
<input id="softwareName_software-0" name="softwareName_software" value="Cloud Antispam" type="hidden"/>
</div>
</td>
<td>
<div>
<div>
<span>
<input id="select_boolean_software_1" type="checkbox" value="1" name="select_boolean_software"/>
</span>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div>
<span>Cloud Email Security</span>
<input name="productLine_software" value="Cloud Email Security" type="hidden"/>
</div>
</td>
<td>
<div>
<span>Core</span>
<input id="productCategory_software-0" name="productCategory_software" value="Core" type="hidden"/>
</div>
</td>
<td>
<div>
<span>Cloud Email Security</span>
<input name="softwareName_software" value="Cloud Email Security" type="hidden"/>
</div>
</td>
<td>
<div>
<div>
<span>
<input id="select_boolean_software_1" type="checkbox" value="1" name="select_boolean_software"/>
</span>
</div>
</div>
</td>
</tr>
我在 Selenium 中使用这个 CSS 选择器代码
css=tr:contains('Cloud Email Security & Content Control') input[type = 'checkbox']
它总是选择第一行而不是第二行。有什么想法吗?(我删除了剩余标签,因为代码很长)