我是Selenium IDE用户的新手。我试图“点击”ID为动态的表格中的项目;从表中添加或删除新项目时它会更改。有问题的特定项目在[td id =“GroupsNotAssigned_LBI2T0”]下面的HTML代码末尾标出。与id关联的项的文本是[NPM读写数据和只读保留]。
提前感谢您的帮助 使用Selenium IDE 2.9 使用Firefox 42.0
<td id="frmProfile_4_2" class="dxflGroupCell">
<table class="dxflCLTSys dxflItemSys dxflCustomItemSys dxflItem" cellspacing="0" cellpadding="0" style="border-collapse:collapse;border-collapse:separate;">
<tbody>
<tr>
<td class="dxflHALSys dxflVATSys dxflCaptionCell dxflCaptionCellSys" style="width: 98px;">
<label class="dxflCaption">Not a member of:</label>
</td>
</tr>
<tr>
<td class="dxflNestedControlCellSys dxflNestedControlCell">
<input id="GroupsNotAssignedDeletedItems" type="hidden" value="" name="GroupsNotAssignedDeletedItems">
<input id="GroupsNotAssignedInsertedItems" type="hidden" value="" name="GroupsNotAssignedInsertedItems">
<input id="GroupsNotAssignedCustomCallback" type="hidden" value="" name="GroupsNotAssignedCustomCallback">
<table id="GroupsNotAssigned" class="dxeListBox_BFS2014 " cellspacing="0" cellpadding="0" style="height:250px;width:250px;border-collapse:collapse;border-collapse:separate;">
<tbody>
<tr>
<td>
<div id="GroupsNotAssigned_D" class="dxlbd" style="height: 246px; width: 248px; overflow: auto;" tabindex="-1">
<input id="GroupsNotAssigned_VI" type="hidden" name="GroupsNotAssigned" value="113">
<table cellspacing="0" cellpadding="0" style="border-collapse:collapse;border-collapse:separate;visibility:hidden!important;display:none!important;">
<tbody>
<tr id="GroupsNotAssigned_LBI-1" class="dxeListBoxItemRow_BFS2014">
<td id="GroupsNotAssigned_LBI-1T0" class="dxeListBoxItem_BFS2014"> </td>
</tr>
</tbody>
</table>
<table id="GroupsNotAssigned_LBT" cellspacing="0" cellpadding="0" style="width: 100%; border-collapse: separate;">
<tbody>
<tr class="dxeListBoxItemRow_BFS2014">
<tr class="dxeListBoxItemRow_BFS2014">
<tr class="dxeListBoxItemRow_BFS2014">
<td id="GroupsNotAssigned_LBI2T0" class="dxeListBoxItem_BFS2014">NPM Read Write Data and Read Only Reserves</td>
</tr>
[代码1的图片]
答案 0 :(得分:0)
不确定您想要做什么,但看起来应该可行:
<tr>
<td>click</td>
<td>//td[contains(@id,"GroupsNotAssigned_LBI"]</td>
<td></td>
</tr>