# Playwright

Playwright is a browser-automation and testing framework that drives Chromium, Firefox, and WebKit from a single API, enabling reliable end-to-end testing of modern web applications. It is open source and self-hosted, installable on Docker Hub and TrueNAS.

Canonical page: https://ourlocalhost.com/app/4435/playwright

## Description

Playwright is a browser-automation and testing framework that drives Chromium, Firefox, and WebKit from a single API, enabling reliable end-to-end testing of modern web applications.

## Platform availability

Available on 1 of 10 platforms: TrueNAS.

## Health score

82/100 (Excellent), based on 3 of 4 factors.
- Maintained: 100 (last commit 4 days ago)
- Popular: 100 (100,427 GitHub stars)
- Easy to install: 25 (1 install platform, install notes)

## Links

- GitHub: https://github.com/microsoft/playwright
- Docker Hub: https://hub.docker.com/r/microsoft/playwright
- TrueNAS: https://apps.truenas.com/catalog/playwright/
- Official website: https://playwright.dev/

## Common questions

### How do I install Playwright's Chromium browser with the required OS dependencies?

Run npx playwright install --with-deps chromium before running Chromium tests. It downloads the browser and required system libraries in one step, so tests do not fail because a browser or dependency is missing.

### How can I reuse login authentication state across Playwright tests?

Save authentication state once using page.context().storageState with a path such as auth.json. Reuse that saved state in other tests with test.use and the same storageState path.

### How can I make Playwright test selectors more resilient?

Use locators that mirror how users see the page, such as getByRole, getByLabel, getByPlaceholder, and getByTestId. This avoids brittle CSS paths.

### What should I check if Playwright tests fail in CI but pass locally?

Check for flaky tests, timeout issues, browser setup problems, and unstable pipelines.

## Alternatives

- Selenium: Selenium is a suite of tools specifically for testing web applications.
- puppeteer: Puppeteer is a Node library which provides a high-level API to control headless Chrome or Chromium over the DevTools Protocol.

---
Source: Our Local Host (https://ourlocalhost.com/app/4435/playwright), the self-hosted and open-source app directory.
