seleniumboot / seleniumboot/selenium-boot

Debug mode: debug.slowMoMs and debug.highlight for live triage

Open
#52 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
Java
Stars
12
Forks
6
Avg merge
5h 48m
Merged PRs (30d)
18

Description

Problem

Neither slowMo nor highlight exist anywhere in source today (grep -rn "slowMo\|highlight" src/main/java returns nothing). TraceRecorder (src/main/java/com/seleniumboot/tracing/TraceRecorder.java) and RecordingManager produce post-mortem artifacts (trace HTML, screenshots) after a test finishes, but there's no way to watch a test execute slowly or see which element the framework resolved in real time while it's still running.

Why it matters

Diagnosing a flaky locator or timing issue currently means re-running the whole suite and reading a static trace afterward, rather than watching the browser as it happens.

Proposed API
// SeleniumBootConfig — new Debug section
public static final class Debug {
    private long slowMoMs = 0;       // delay after each terminal action
    private boolean highlight = false; // JS outline on the resolved element before acting
    // getters/setters
}
debug:
  slowMoMs: 300
  highlight: true
// Locator.java — applied in resolve() / terminal actions, e.g. click()
public void click() {
    WebElement el = waitForClickable(resolve());
    DebugSupport.highlightIfEnabled(driver(), el);
    el.click();
    DebugSupport.slowMoIfEnabled();
}
Acceptance criteria
  • debug.slowMoMs and debug.highlight config keys added
  • Highlight applies a temporary JS outline (e.g. outline: 2px solid red) to the resolved element immediately before each terminal action in Locator, restored/left as-is after (define which)
  • slowMoMs sleeps for the configured duration after each terminal action
  • Both are opt-in and no-op with zero overhead when unset/disabled (don't slow down default runs)
  • Unit tests for the config plumbing; document that this is unsuitable for CI (dev-only)
  • Docs note this complements TraceRecorder/RecordingManager — this is live triage, those are post-mortem

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading SeleniumBootConfig and Locator, then review TraceRecorder and RecordingManager to understand the existing debugging flow. Identify terminal actions in Locator and the config-test structure before deciding how highlight restoration and slow-motion timing should work. Done means both keys are opt-in, covered by unit tests, documented as dev-only live triage, and do not affect default runs.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.