Sure, you can manage browser downloads for video playback testing in Playwright.
By default, Playwright downloads the latest Chromium version. But, you can specify a different version or browser by setting environment variables.
To download browsers into a specific location, use the PLAYWRIGHT_BROWSERS_PATH
environment variable. Here's how:
PLAYWRIGHT_BROWSERS_PATH=$HOME/pw-browsers npx playwright install
If you manage browser binaries separately, you can skip browser downloads with the PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD
variable:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npx playwright install
Remember, Chromium may not have all the codecs bundled with Google Chrome or Microsoft Edge due to licensing. If your site relies on specific media codecs, it's recommended to use official channels such as Google Chrome or Microsoft Edge for testing.
For enterprise environments with policies that restrict certain capabilities or require mandatory extensions, using bundled Chromium for local testing is recommended.
Playwright's Firefox version matches the recent Firefox Stable build. Playwright does not work with branded versions of Firefox and instead relies on patches. Therefore, it is recommended to test against the recent Firefox Stable build when using Playwright with Firefox.
In short, Playwright gives you flexibility in managing browsers for testing video playback. You can specify a custom location for browser downloads, skip browser downloads altogether, and choose between different browsers based on their capabilities and your specific testing requirements.
If you still have questions, please ask a question and I will try to answer it.
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].