Skip to content

Conversation

@ajayrakde
Copy link
Owner

Motivation

  • Centralize all "wait until ready" logic into a single, deterministic Sync Kernel that is intent-aware (CLICK/TYPE/NAVIGATE/ASSERT/etc.).
  • Make readiness capability-driven so BiDi-dependent gates are soft/skipped when unsupported and the engine falls back to Selenium hints.
  • Provide robust, facts-only diagnostics and bounded waits to avoid indefinite or heuristic-driven blocking.

Description

  • Add core sync API and models: Intent, SyncKernel, WaitTarget variants, WaitOptions, WaitResult, SyncDiagnostics, and GateStatus under java/src/org/openqa/selenium/locator/sync to define the public surface.
  • Introduce a policy model and defaults under sync/policy including ReadinessProfile, QuietWindows, ConsolePolicy, NetworkPolicy, StabilityPolicy, NavMode, and a DefaultSyncPolicy with intent-specific profiles and timeouts.
  • Implement the Selenium-backed Sync Kernel DefaultSyncKernel and factory SeleniumSyncKernelFactory with gate evaluators, probes, and navigation-mode handling in sync/selenium/impl, including DocumentReadyGate, UrlStableGate, NetworkQuietGate, ConsoleCleanGate, GlobalAnimationsQuietGate, TargetStableGate, RouteEventSeenGate, DomTokenStableGate, JS probes (JsReadyStateProbe, JsDomTokenProbe, JsHistoryHook), and a SyncDiagnosticsBuilder for bounded diagnostics.
  • Add console relevance helper, diagnostics providers, SyncTimeoutException, and applyWaitOptions/JS-fallback augmentation logic so post-action waits are stricter when JS fallbacks are used.
  • Add unit tests covering gate logic and wait-loop behaviors in java/test/org/openqa/selenium/locator/sync and register them in the SmallTests suite, and add user-journey documentation (java/docs/locator-sync-user-journey.md) plus a small update to locator-engine-user-journey.md.

Testing

  • Added unit tests under java/test/org/openqa/selenium/locator/sync/ and wired them into the SmallTests suite, but the full test suite was not executed in this environment.
  • Attempted bazel test //java/test/org/openqa/selenium:SmallTests but the run could not complete because Bazel could not be downloaded in this environment (download forbidden), so tests were not run to completion.
  • Ran rake lint as part of verification and it failed in this environment due to a missing Ruby dependency (net/telnet), so linting could not be completed here.

Codex Task

@ajayrakde ajayrakde merged commit da8845a 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