我目前有以下xpath://tr[td//text()='AD'][1]
根据我的理解,这意味着:"find the first tr which has some td child which has any descendant whose text is equal to 'AD'"
它是否正确?如果是这样,我想将 xpath 更改为以下定义:
"find the first tr whose second td child has text equal to 'AD'"
“找到第一个 tr,其第二个 td 子项的文本等于‘AD’”
可能会被实现为
//tr[td[position()=2 and text()="AD"]]
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
699 次 |
| 最近记录: |