microsoft / microsoft/playwright-pytest
Playwright starts browser in headed mode when called from VS Code Debugger - even on headless server
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 563
- Forks
- 90
- Avg merge
- 11m
- Merged PRs (30d)
- 1
Description
The current implementation starts the browser in headed mode automatically, if pytest is invoked from VS Code's debugger.
While I get the idea behind this, it does not take remote development on a headless server into account. If $DISPLAY is not set, the test run naturally fails and leaves the user wondering why this happens because he did not provide --headed (e.g. in VS Code's python.testing.pytestArgs configuration). IMHO, the implementation should be changed to check for $DISPLAY at least.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading pytest_playwright/pytest_playwright.py at lines 118-120, then reproduce pytest from the VS Code debugger on a headless server with DISPLAY unset. Done means the automatic headed-mode behavior no longer causes this run to fail when no DISPLAY is available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- playwright, python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100