feat(selenium-devtools-py): CDP push-mode screencast and performance capture - #328
Merged
Conversation
Greptile SummaryThe PR adds CDP push-mode screencasting and navigation performance capture to the Python Selenium adapter, while fixing first-selection snapshot replay in the viewer.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| packages/selenium-devtools-py/src/selenium_devtools/screencast.py | Adds synchronized bounded-frame decimation and retains the latest skipped frame during finalization, resolving the previously reported stale video tail. |
| packages/selenium-devtools-py/src/selenium_devtools/cdp_screencast.py | Implements best-effort push-mode Chrome screencasting over an independently owned CDP connection with frame acknowledgements and cleanup. |
| packages/selenium-devtools-py/src/selenium_devtools/instrumentation.py | Integrates push-stream lifecycle and post-navigation performance enrichment into per-driver command capture. |
| packages/selenium-devtools-py/src/selenium_devtools/performance.py | Captures browser navigation and resource timing data and shapes it for replacement command rows. |
| packages/app/src/components/browser/snapshot.ts | Ensures snapshot mode and its iframe finish rendering before DOM replay begins. |
| packages/selenium-devtools-py/tests/test_screencast.py | Covers bounded growth, middle-run retention, final-frame preservation, ordering, and idempotent shutdown. |
Sequence Diagram
sequenceDiagram
participant Browser
participant CDP as Dedicated CDP socket
participant Recorder as ScreencastRecorder
participant Finalizer
Browser->>CDP: screencastFrame
CDP->>Recorder: add_frame(data)
CDP->>Browser: screencastFrameAck
Finalizer->>CDP: stop()
Finalizer->>Recorder: finalize()
Recorder->>Recorder: stop() and retain pending tail
Recorder->>Recorder: encode retained frames
Reviews (2): Last reviewed commit: "fix(selenium-devtools-py): end the scree..." | 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)selenium-devtools-pyNotes for reviewers
Screenshots / recordings