我正在尝试从匹配上一表中搜索参数文本的文本的搜索结果中确定单元格的xpath。 在此示例中,它显示搜索的案例编号为:14-CV-12-14。 然后它列出了3个变量选项:14-CV-00-1214,14-CV-01-214和14-CV-12-14。 当然我只想要一个与搜索到的数字匹配的那个,但它并不总是在最后一行,所以我不能使用last()函数。
<table>
removed previous code
</table>
如何选择包含与不同表格中单元格文本匹配的文本的单元格?提前感谢您对此的任何帮助!
好的,让我对我正在使用的代码更加具体。
实际HTML(已修改):
<table 1>
<tr></tr>
<tr>
<td id="SearchParamList" colspan="2">
<b>
Search By:
</b>
Case
<b>
Exact Name:
</b>
on
<b>
Case Search Mode:
</b>
Number
<b>
Case Number:
</b>
14-CV-12-11
<b>
All
</b>
All
<b>
Sort By:
</b>
Filed Date
</td>
</tr>
</table 1>
<table 2>
<tr>
<th class="ssSearchResultHeader" nowrap="true">
<b>
Case Number
</b>
</th>
<th class="ssSearchResultHeader" nowrap="true">
<b>
Style
</b>
</th>
<th class="ssSearchResultHeader">
<b>
Filed/Location/Judicial Officer
</b>
</th>
<th class="ssSearchResultHeader" nowrap="true">
<b>
Type
</b>
<b>
/Status
</b>
</th>
</tr>
<tr>
<td valign="top" nowrap="true">
<a style="color: blue" href="CaseDetail.aspx?CaseID=581">
14-CV-00-1214
</a>
</td>
<td valign="top">
RENT A CENTER PLAINTIFF VS CYNTHIA MCPHERSON DEFEN…
</td>
<td valign="top" nowrap="true">
<div>
01/27/2000
</div>
<div>
- Hennepin Civil
</div>
<div></div>
</td>
<td valign="top" nowrap="true">
<div>
Transcript Judgment
</div>
<div>
Closed
</div>
</td>
</tr>
<tr bgcolor="#EEEEEE">
<td valign="top" nowrap="true">
<a style="color: blue" href="CaseDetail.aspx?CaseID=669">
14-CV-01-214
</a>
</td>
<td valign="top">
FRANCHISE WHOLESALE CO., LLC, A MISSOURI LIMITED L…
</td>
<td valign="top" nowrap="true">
<div>
01/05/2001
</div>
<div>
- Hennepin Civil
</div>
<div></div>
</td>
<td valign="top" nowrap="true">
<div>
Default Judgment
</div>
<div>
Closed
</div>
</td>
</tr>
<tr>
<td valign="top" nowrap="true">
<a style="color: blue" href="CaseDetail.aspx?CaseID=167">
14-CV-12-11
</a>
</td>
<td valign="top">
Capital One Bank USA NA vs Jill A Hildebrant
</td>
<td valign="top" nowrap="true">
<div>
12/30/2011
</div>
<div>
- Hennepin Civil
</div>
<div></div>
</td>
<td valign="top" nowrap="true">
<div>
Default Judgment
</div>
<div>
Closed
</div>
</td>
</tr>
</table 2>
这是清楚的吗?