Selenium and Nightwatch Trace Parity - #273
Open
vishnuv688 wants to merge 31 commits into
Open
Conversation
Member
Author
Greptile SummaryThis PR expands Selenium and Nightwatch trace parity by improving command timing, DOM collection, action snapshots, assertions, locator portability, and replay presentation.
Confidence Score: 5/5The PR appears safe to merge because no concrete, unacknowledged changed-code failure was established. The revised capture, locator, timing, metadata, and replay paths are supported by focused tests, while the remaining plausible limitations are either explicitly documented or contradicted by the implementation.
|
| Filename | Overview |
|---|---|
| packages/nightwatch-devtools/src/helpers/browserProxy.ts | Reworks command interception, navigation injection, failure extraction, ordering, assertions, and input-dispatch coordination; no unacknowledged concrete defect was established. |
| packages/nightwatch-devtools/src/session.ts | Adds raw-transport collection, destination-page anchoring, command-timestamped snapshots, and pending capture tracking. |
| packages/core/src/action-snapshot.ts | Timeout-guards every driver probe, binds captures to command timestamps, and generates runner-specific web locators. |
| packages/core/src/element-scripts.ts | Consolidates visibility and locator generation while adding portable XPath and runner-specific WebdriverIO text locators. |
| packages/core/src/trace-frame-snapshots.ts | Makes snapshot claims reusable and provides a latest-prior fallback for actions without a fresh capture. |
| packages/shared/src/locator-dialect.ts | Defines runner locator dialects and cross-dialect matching helpers with focused edge-case tests. |
| packages/selenium-devtools/src/driverPatcher.ts | Aligns command completion timing, snapshot capture, locator tracking, and input-dispatch gating with shared trace semantics. |
| packages/app/src/components/browser/element-overlay.ts | Adds safe XPath resolution in replayed iframe documents while retaining CSS and WebdriverIO text-selector support. |
| packages/backend/src/trace-reader-utils.ts | Safely narrows and propagates runner metadata from standalone trace context events. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Test framework command] --> B[Adapter interception]
B --> C[Core command and snapshot capture]
C --> D[Page collector and DOM mutations]
C --> E[Trace exporter]
D --> E
E --> F[Backend trace reader]
F --> G[Replay UI]
G --> H[DOM, accessibility tree, overlays, and locator hints]
Reviews (1): Last reviewed commit: "docs: correct the click-activation attri..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Type of change
Packages touched
shared(types and contracts)core(framework-agnostic capture/reporting)elements(published element/snapshot API —@wdio/elements)service(WebdriverIO adapter)nightwatch-devtools(Nightwatch adapter)selenium-devtools(Selenium adapter)backend(server)app(UI)script(page-injected runtime)Notes for reviewers
Screenshots / recordings