2
我被困根据已知的td类为标题创建xpath。xpath根据已知的嵌套td元素的表标题
<tr>
<td class="...">
<table class="...">
...
</table>
</td>
<td class="...">
<table class="...">
<caption class="...">CAPTION_WANTED</caption>
<colgroup>
...
</colgroup>
<tbody>
...
<tr class="...">
...
</tr>
<tr class="...">
...
<td class="...">
...
</td>
<td class="TD_KNOWN">
<div class="...">...</div>
</td>
...
</tr>
...
</tbody>
</table>
</td>
</tr>
...
我试过这个://*tr[KNOWN_ID]/td/table[tbody[tr[td[@class,"TD_KNOWN"]]]]/caption
但它没有奏效。 当我想要包含smth的smth包含smth ...时,我应该使用方括号吗?
的webdriver无法找到一个元素 – AntonK
你能PLS给你想要的输出 – Raghavendra