Skip to content

Clarify outputDir behavior for explicit relative --filename paths #382

@zwrong

Description

@zwrong

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions