feat(selenium-devtools-py): configure capture from pytest, not just the shell - #355
Open
vishnuv688 wants to merge 1 commit into
Open
feat(selenium-devtools-py): configure capture from pytest, not just the shell#355vishnuv688 wants to merge 1 commit into
vishnuv688 wants to merge 1 commit into
Conversation
Greptile SummaryThe PR adds explicit pytest CLI and ini configuration for Python Selenium DevTools capture while retaining environment-variable fallback.
Confidence Score: 5/5The PR appears safe to merge, with no concrete blocking or independently actionable non-blocking issue established. The new pytest configuration paths are covered across CLI, ini, environment, collect-only, and empty-run behavior, and no reachable regression was established from the changed lifecycle logic.
|
| Filename | Overview |
|---|---|
| packages/selenium-devtools-py/src/selenium_devtools/pytest_plugin.py | Adds pytest option registration, precedence resolution, cached run enablement, trace-mode forwarding, and empty-collection teardown without an established defect. |
| packages/selenium-devtools-py/tests/test_pytest_config.py | Adds unit and real-pytest subprocess coverage for CLI, ini, environment, collect-only, precedence, and teardown behavior. |
| packages/selenium-devtools-py/README.md | Documents the new pytest flags, ini settings, precedence rules, environment fallback, and trace behavior. |
| package.json | Updates the pytest demo command to opt in through the new CLI flag. |
| examples/selenium/python-test/test_login_pytest.py | Updates the example invocation to demonstrate --devtools. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
Start[pytest starts] --> CollectOnly{collect-only?}
CollectOnly -->|Yes| Disabled[Capture disabled]
CollectOnly -->|No| CLI{CLI capture or trace flag?}
CLI -->|Yes| Enabled[Enable capture]
CLI -->|No| INI{Explicit ini setting?}
INI -->|Enabled| Enabled
INI -->|Disabled| Disabled
INI -->|Unset| ENV{DEVTOOLS_ENABLE or DEVTOOLS_PORT?}
ENV -->|Present| Enabled
ENV -->|Absent| Disabled
Enabled --> Collection{Tests collected?}
Collection -->|No| Teardown[Disable unused run]
Collection -->|Yes| Capture[Capture test lifecycle]
Reviews (1): Last reviewed commit: "feat(selenium-devtools-py): configure ca..." | 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