让知识彼此相连

知识图谱

沿着人物与判断,回到原始证据。

1 位人物 · 1 个来源 · 1 条观点

放回语境

测试自动化设计

选择一条判断,追溯到它所在的原始对话。

WebDriver 有意不解决等待机制中的停机问题

放回语境测试自动化设计1 条观点
2026-10-01

等分区块用于阅读定位,不表示排名或权重。

当前 1–1 / 共 1 条判断 · 按来源日期由新到旧

1 / 1

当前判断

WebDriver 有意不解决等待机制中的停机问题

WebDriver 的规范刻意避免为等待元素定义通用解决方案——因为判断元素何时“就绪”可能会面临不可判定的停机问题——而是专注于对实用且可观察的行为(如可见性、可交互性)进行标准化,而不依赖像素级或布局相关的检查。

这些是个人表达的观点,并非共识度量。原始资料保持其原始语言。

支持这项说法

浏览器测试现状 — Software Engineering Daily

有趣的问题随之而来,比如:你怎么知道某个元素确实在页面上?或者你需要等待多久?那里的问题归根结底是如何在不试图解决停机问题的前提下,对一种有意义的等待进行一定程度的标准化。

原始摘录
The interesting problems came as like, when do you know that an element is actually on the page? Or how long do you have to wait? And the problem there comes down to somewhat standardizing a meaningful wait without trying to solve the halting problem.
上下文

所以一旦你有了制定规范的想法,我们所做的很多工作就是试图决定哪些可以标准化、哪些不能。对于 Selenium 或 WebDriver 来说,简单的事情是“我想输入文字”,或者“我想点击、想移动鼠标、想拖放”。这些看起来相对容易。 停机问题是著名的图灵问题,它是无法解决的,对吧?而自动化要弄清楚这一点极其困难。所以你并不是在试图解决那个问题。 另一个问题是,当你想要操作某个东西时,它是否可见?因为 WebDriver 刚起步时,Simon 就说:“当有人点击某个东西时,它必须是可见的。”但“可见”是什么意思呢?而且不能逐像素检查,因为可能会有覆盖层之类的东西,CSS 有 Z 轴索引,但它并不真的是 Z 轴索引,因为你可以通过 DOM 和 CSS 的布局方式让其他东西覆盖在上面,等等。这变得非常困难。 大量的精力就花在了这些地方,试图解决那些人们未必需要解决的稍难一些的问题。然后再创造一种方式,让人们能够通过其他标准、其他规范来扩展 WebDriver。这样无论他们在构建什么,都会说:“Oh, w”……

原始上下文

So once you've got the idea for a specification, a lot of the work that we did was trying to decide what we could standardize and what we couldn't. For Selenium, the easy things were, "I want to type," or WebDriver. I want to type, I want to click, I want to move the mouse, I want to drag, drop. Those seemed relatively easy. The halting problem, famous Turing problem, and it's impossible to solve, right? And automation becomes so hard to figure that out. And so you're not trying to solve that one. The other one was, is something visible when you want to do it? Because when WebDriver started, Simon was like, "When someone clicks on something, it needs to be visible." What does visible mean, right? And without doing pixel by pixel checks, because you can have overlays and things like that and CSS, has a Z index, but it's not really a Z index because you can have other things that can overlay just by the way you lay out the DOM and the CSS and things like that. And it becomes very hard. And that's where a lot of the effort went into, was trying to solve these slightly harder problems that people didn't need to necessarily solve. And then create a way that people could extend out WebDriver through other standards, through other specifications. So that whenever they were building something, they go, "Oh, w

时间点来自所提供的转录稿,尚待媒体回放核对。

打开该集并跳转至14:19。

日期表示来源发表时间,不代表观点发生变化。 缺少审核合格译文的内容保留原文。