Skip to content

Conversation

kmcgon
Copy link

@kmcgon kmcgon commented Sep 4, 2025

Fixes #2965

If a path without a file type extension is provided without passing the file type arg to screenshot, it will throw an Error that you provided an invalid mimetype (None).

This causes the --screenshot command line arg in the playwright-pytest plugin to no longer work, as it passes a path without an extension.

Documentation on playwright.dev and the docstrings state the default screenshot file type should be PNG, this PR will default to PNG if type or a file extension in path are not provided.

@kmcgon
Copy link
Author

kmcgon commented Sep 4, 2025

@microsoft-github-policy-service agree

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.

[Bug]: screenshot Errors if path without file extension is provided with specifying type
1 participant