Chrome DevTools 找不到元素不搜索 [英] Chrome DevTools not find elements not search

本文介绍了Chrome DevTools 找不到元素不搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 selenium 进行 chrome 自动化.一段时间以来,chrome (F12) 的 DevTool 无法按预期工作.(版本 84.0.4147.89(正式版)(64 位))

当我尝试定位元素时,即使元素存在也找不到它.即使我按 ctrl + f 并搜索一个大词,也找不到它.我需要开发工具,因为它可以标记元素的位置以及我的站立位置.他们有什么解决方案吗?我提供了两张图片:一张是找到并标记了值,在我添加了字母c"后它没有找到.此外,它说找到一个,它是搜索字段,chrome怎么了?以及所有未找到的定位器

解决方案

真正的问题是

但是,如果有多个元素匹配 定位器策略,除了第一个匹配的元素,其他元素都高亮显示.

I am using selenium for chrome automation. for a while now the DevTool of chrome (F12) not working as expcted. (Version 84.0.4147.89 (Official Build) (64-bit))

When I try to locate element it is not find it even the element exists. Even when I press ctrl + f and search for a big word it is not find it. I need the dev tool since it is mark where the element, and where I am standing. Is their any soloution? I provide two pics: in one it's find and marked the value, and after I add the letter 'c' it is not find. Moreover it says found one and it is the search field, what happened to chrome? and all the locators not found as well

解决方案

The real issue is DevTools within Google Chrome 84.0 doesn't highlights the first matched element.

Incase, it's a single match, the search result does show 1 of 1 but the element is not highlighted within the DOM Tree

As an example, we all are aware that the search box on Google Home Page can be identified uniquely using the :

[name='q']

DevTools within Google Chrome 84.0, does finds the element and shows 1 of 1 but the element is not highlighted.

However, if there are multiple element matching to the Locator Strategy, barring the first matched element, the other elements are highlighted.

这篇关于Chrome DevTools 找不到元素不搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆