Skip to content

Add configurable screenshot directory#229

Open
emaadali wants to merge 1 commit into
pestphp:4.xfrom
emaadali:configure-screenshot-directory
Open

Add configurable screenshot directory#229
emaadali wants to merge 1 commit into
pestphp:4.xfrom
emaadali:configure-screenshot-directory

Conversation

@emaadali

Copy link
Copy Markdown

What:

  • Bug Fix
  • New Feature

Description:

Allow browser screenshots to be written to a custom directory.

The default location is unchanged, but projects can now configure the screenshot path with pest()->browser()->screenshots($dir).

This is useful when running more than one test process at the same time, for example when multiple AI agents are running browser tests and would otherwise overwrite each other's screenshots.

Usage:

$someId = "xyz";

$screenshotDirectory = dirname(__DIR__) . '/tests/Browser/Screenshots/' . $someId;

pest()->browser()->screenshots($screenshotDirectory);

Related:

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: allow screenshots to be saved in subdirectories

1 participant