Skip to content

feat(tracing): list the locators each step used in the trace - #204

Merged
shossain786 merged 2 commits into
masterfrom
feat/trace-locators-per-step
Oct 25, 2026
Merged

shossain786 merged 2 commits into
masterfrom
feat/trace-locators-per-step

Conversation

@shossain786

Copy link
Copy Markdown
Contributor

What & why

Refs #130 (locators used per step).

A shared trace shows what happened but not which element each action targeted. Terminal Locator actions (everything through whenReady) now record the locator and time offset; the trace lists them under Locators Used, grouped beneath the step they ran in (earlier ones under "Before first step"). A lookup that timed out is marked not found. No config, capped at 1000 per test.

Scope

Only actions that go through Locator's wait path. Raw driver.findElement calls and non-waiting probes (count(), isVisible()) are not recorded. The action name (click vs type) is not recorded, only the locator.

Verification

  • New tests failed before (did not compile / section missing) and pass after: grouping under steps, pre-first-step bucket, failed marker, omitted when empty, and Locator.click() records into TestTiming.
  • mvn test: 829 passed, 0 failures.
  • Not run against a real browser.

🤖 Generated with Claude Code

Terminal Locator actions record the locator and offset into the test's
timing; the trace groups them under the step they ran in and marks
lookups that timed out.

Refs #130

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

# Conflicts:
#	src/main/java/com/seleniumboot/tracing/TraceRecorder.java
#	src/test/java/com/seleniumboot/unit/TraceRecorderTest.java
@shossain786
shossain786 merged commit 3ee5b2a into master Oct 25, 2026
2 checks passed
@shossain786
shossain786 deleted the feat/trace-locators-per-step branch October 25, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant