Temas / test automation design

Punto de vista parafraseado

WebDriver intentionally avoids solving the halting problem in waits

WebDriver’s specification deliberately refrains from defining a universal solution for waiting for elements—because determining when an element is 'ready' risks confronting the undecidable halting problem—and instead focuses on standardizing pragmatic, observable behaviors (e.g., visibility, interactability) without pixel-level or layout-dependent checks.

Detrás de la opinión

Las traducciones son para facilitar la lectura; los extractos originales siguen siendo la source evidence.

The State of Browser Testing - Software Engineering Daily

Extracto original

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.
Contexto

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

Abrir el episodio y buscar el momento 14:19.

La hora de inicio proviene de la transcripción proporcionada. La alineación de la reproducción está pendiente de revisión.