Skip to content

Add non-blocking locator stability signals: core models, Selenium sampler, evaluator, and tests#3

Merged
ajayrakde merged 1 commit intotrunkfrom
codex/implement-ui-stability-sampling-in-selenium
Jan 19, 2026
Merged

Add non-blocking locator stability signals: core models, Selenium sampler, evaluator, and tests#3
ajayrakde merged 1 commit intotrunkfrom
codex/implement-ui-stability-sampling-in-selenium

Conversation

@ajayrakde
Copy link
Owner

Motivation

Description

  • Add core signal models and config records under org.openqa.selenium.locator.stability.model including Rect, VisibilityFlags, StabilitySnapshot, GlobalStabilitySnapshot, StabilityHistory, and StabilityConfig with defaultConfig().
  • Add core APIs under org.openqa.selenium.locator.stability.api including Clock, SystemClock, StabilitySampler, StabilityEvaluator, and StabilityService.
  • Implement Selenium integration under org.openqa.selenium.locator.stability.selenium and ...selenium.impl with SeleniumStabilityService, JsStabilitySampler, DefaultStabilityService, and DefaultStabilityEvaluator, plus JS payloads and parsing in JsScripts and JsResultParser.
  • Add documentation java/docs/locator-stability-signals.md and update the locator user-journey doc to note the non-blocking stability sampling behavior, and wire unit tests into the Bazel test suite (java/test/... changes).
  • Add unit tests for the parser, evaluator, service append logic, and an architecture guardrail test (StabilityArchitectureTest) that asserts stability package bytecode does not reference Thread.sleep, WebDriverWait, or ExpectedConditions.

Testing

  • Added unit tests: JsResultParserTest, DefaultStabilityEvaluatorTest, DefaultStabilityServiceTest, and StabilityArchitectureTest (all tagged as unit tests).
  • Attempted to run bazel test //java/test/org/openqa/selenium:SmallTests, but the run failed in this environment because Bazel could not be downloaded from releases.bazel.build (HTTP/permission error), so tests could not be executed here.
  • The new architecture test is designed to run in CI to enforce the no-waits/no-sleeps guardrail and the other unit tests validate parsing, evaluator correctness, and bounded-history behavior when executed in a full build environment.

Codex Task

@ajayrakde ajayrakde merged commit 5d0624e into trunk Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant