gpt4 book ai didi

XPath - "get first tr where its first td has text equal to ' abcd'"

转载 作者:行者123 更新时间:2023-12-03 15:45:44 27 4
gpt4 key购买 nike

我目前有以下 xpath://tr[td//text()='AD'][1]

根据我的理解,这意味着:“找到第一个 tr,它有一些 td 子代,其任何后代的文本等于 'AD'”

这是正确的吗?如果是这样,我想将 xpath 更改为以下定义:

"找到第一个 tr,其第二个 td child 的文本等于 'AD'"

最佳答案

"find the first tr whose second td child has text equal to 'AD'"

可以实现为

//tr[td[position()=2 and text()="AD"]]

关于XPath - "get first tr where its first td has text equal to ' abcd'",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51992872/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com