问题描述
如果按 F12
,请转到元素
并单击 ctrl + F
来搜索xPath,如果我只找到一个元素,则该元素不会突出显示(但Chrome会指出 1的1
)。如果我发现多个元素,Chrome将从第二个元素突出显示。当我在xPath中使用索引时,也会出现问题:(// a)[1]
。
if I press F12
, go to Elements
and click ctrl+F
to search for a xPath, if I find only one element, that element is not highlighted (but Chrome will point out 1 of 1
). If i find more than one elements, Chrome highlights from the second one. Problem occures also when I use indexes in xPath: (//a)[1]
.
推荐答案
似乎您在谈论此错误(已在Chromium问题论坛中进行了报道)。
Seems like you are talking about this bug https://bugs.chromium.org/p/chromium/issues/detail?id=1106703 which was reported in the Chromium issue forums.
Chrome 84中引入了此更改,
It was introduced in Chrome 84 with this change https://developers.google.com/web/updates/2020/05/devtools
我想我们只能等待或降级到Chrome 83(在企业环境中可能无法实现)
I guess we can only wait or downgrade to Chrome 83 (which might not be possible in a corporate environment)
这篇关于给定xPath时,Chrome Elements控制台不会显示唯一元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!