Sure, let's dive into this!
By default, @playwright/test uses the latest Chromium for testing. This is a great choice as it stays ahead of stable channels for browsers like Google Chrome and Microsoft Edge. This means you can catch any potential issues early before an official Chrome update.
However, there are times when you might need to test against official binaries of Google Chrome and Microsoft Edge. For example, if you're doing regression testing, you'll want to test against the current publicly available browsers. In this case, you can use one of the stable channels provided by Playwright.
import { test } from '@playwright/test';
test('my test', async ({ page }) => {
await page.goto('https://ray.run/');
// your test here
});
Chromium doesn't include all the codecs bundled with Google Chrome or Microsoft Edge due to licensing considerations. If your site relies on specific media codecs, you should use the official channel for accurate testing. Also, if your organization has enterprise policies that restrict certain capabilities, both Google Chrome and Microsoft Edge respect these policies.
For Firefox, Playwright matches the recent Firefox Stable build. So, if you need to test against Firefox specifically, you can do so using Playwright's Firefox version.
In conclusion, while Chromium is a good default, there are situations where testing against branded versions may be necessary. Consider factors like regression testing, media codecs, and enterprise policies when deciding which browsers to include in your tests.
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].