Summary
PLAYWRIGHT_MCP_OUTPUT_DIR redirects automatically named artifacts, but explicit relative --filename values are currently saved relative to the current working directory. It would be useful to clarify whether that is the intended long-term behavior.
Current observed behavior
PLAYWRIGHT_MCP_OUTPUT_DIR=.playwright-cli playwright-cli screenshot
# writes .playwright-cli/page-...png
PLAYWRIGHT_MCP_OUTPUT_DIR=.playwright-cli playwright-cli screenshot --filename=page.png
# writes ./page.png
Options
- Keep the current behavior:
--filename is a fully user-controlled explicit path.
- Add a CLI option such as
--output-dir=.playwright-cli for users who want an explicit output directory.
- Add a clearer CLI-specific environment variable such as
PLAYWRIGHT_CLI_OUTPUT_DIR.
- Change how relative
--filename values are resolved, though that could break existing scripts and is probably not the best default.
Summary
PLAYWRIGHT_MCP_OUTPUT_DIRredirects automatically named artifacts, but explicit relative--filenamevalues are currently saved relative to the current working directory. It would be useful to clarify whether that is the intended long-term behavior.Current observed behavior
Options
--filenameis a fully user-controlled explicit path.--output-dir=.playwright-clifor users who want an explicit output directory.PLAYWRIGHT_CLI_OUTPUT_DIR.--filenamevalues are resolved, though that could break existing scripts and is probably not the best default.