What are the steps to update Playwright to its latest version?


Updating Playwright to the Latest Version

First, let's find out which version of Playwright you're currently using. Run the following command:

npx playwright --version

Now, let's get you updated. Run this command to install the latest version of Playwright and its dependencies:

npm install -D @playwright/test@latest

Keeping Playwright up-to-date allows you to use new features and test your app on the latest browser versions. This helps you catch failures before they're released to the public.

After updating, you might need to update specific versions of browser binaries. Run npx playwright install to install all default browsers supported by your current version of Playwright.

If specific browsers need updating or installing, provide an argument when running npx playwright install. For example, if WebKit needs installing or updating run:

npx playwright install webkit

If system dependencies are required for a single browser or all browsers, run either:

npx playwright install-deps chromium

or for all browsers with OS dependencies included in one command:

npx playwright install --with-deps chromium

Stay updated by regularly checking for updates via release notes or other sources such as Twitter (@PlayWright) or GitHub releases page. This ensures you always have access to new features and bug fixes while keeping your testing environment stable and reliable.

Thank you!
Was this helpful?
Still have questions?

If you still have questions, please ask a question and I will try to answer it.

Related Questions

AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

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 luc@ray.run.