本文介绍了Chrome 84检查元素,查找未像以前一样以黄色突出显示的结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

按照惯例,在进行自动化测试时,我在Chrome中使用检查"(CTRL + SHIFT + I)通过xpath,id,CSS选择器等查找元素.例如:

As per usual when making automated tests I use "Inspect"(CTRL+SHIFT+I) in Chrome to find element by xpath, id, CSS selector etc.For example:

//li/a[contains(text(), "Products")]

以上是该页面的xpath.在先前版本的Chrome中,"DevTools"/"Elements"在按CTRL + F打开查找"选项并粘贴此xpath元素在DevTools窗口中突出显示.在新版的chrome中,未突出显示,通常的"1/1"表示结果显示在查找"窗口的最右边.标签.

Above is an xpath from this page. In previous versions of Chrome in "DevTools"/"Elements" after pressing CTRL+F to open the "Find" option and pasting this xpath element is highlighted in DevTools window. In new version of chrome it is not highlighted, the usual "1/1" results is displayed in far right of the "Find" tab.

我已经搜索了互联网和Chrome设置,但无济于事.黄色高亮显示是节省时间,而且我确定我使用的是正确的元素.

I've search the internet and Chrome Settings but to no avail.The yellow highlight is time saver and I know for certain that I am using the right element.

已修复Chrome版本84.0.4147.105

Fixed with Chrome version 84.0.4147.105

感谢您的更新,建议,解决方法等.

Thank you for updates, suggestions, workarounds etc.

推荐答案

是的,在Chrome 84的最新更新中,查找功能存在问题.报告了3个问题,到现在为止,这些问题处于未经确认的状态(撰写此答案时).您可以在下面的链接中关注它们,以了解更多详细信息-

Yes, In recent updates of Chrome 84, Find feature is buggy. 3 issues have been reported and those are in unconfirmed status as of now (while writing this answer). You can follow them on below links for more details -

  1. 如果元素标签中的元素未突出显示,在DOM中只有一个

查找";功能无法在元素"上使用标签

查找元素/xpath不会直接指向对象


更新

元素搜索在第一次搜索时不会解决Node(突出显示的文本等)问题结果

已修复,它是版本84.0.4147.105(正式内部版本)(64位)的一部分.您只需要更新并重新启动Chrome.上述问题被标记为与此问题重复.

Has been fixed and it is part of Version 84.0.4147.105 (Official Build) (64-bit). You just need to update and relaunch the chrome. The issues mentioned above are marked as duplicate to this issue.

这篇关于Chrome 84检查元素,查找未像以前一样以黄色突出显示的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 00:56