Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: clean up videos after each test #221

Merged
merged 1 commit into from
Apr 16, 2024
Merged

Conversation

mxschmitt
Copy link
Member

else:
for page in self._all_pages:
# Can be changed to "if page.video" once https://github.com/microsoft/playwright-python/pull/2410 is released and used.
if video_option in ["on", "retain-on-failure"]:
Copy link
Member Author

@mxschmitt mxschmitt Apr 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe try/catch instead?

Ideally we look at the context options, but they are not exposed. Since some contexts could have video enabled and some not, try/catch seems the most reasonable.

@mxschmitt mxschmitt force-pushed the bugfix/clean-up-videos2 branch from cc8b7d1 to 6389ab6 Compare April 16, 2024 20:37
@mxschmitt mxschmitt merged commit 40ba0da into main Apr 16, 2024
14 of 17 checks passed
@mxschmitt mxschmitt deleted the bugfix/clean-up-videos2 branch April 16, 2024 20:41
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.

2 participants