Free

Playwright Test: run website browser tests

Write a repeatable Playwright Test with Codex. Fill in a form and verify the outcome, then rerun the browser scenario after changes.
Tools

Installation instructions

Playwright Test checks a website in a real browser using a repeatable scenario. It can open a form, enter data, press a button and verify the outcome.

What you can use it for

  • Check enquiry submission after changing a website.
  • Verify sign-in and account pages with a practice account.
  • Check navigation, keyboard access and different viewport sizes.

How to install

  1. Ask Codex to find the project, package manager and existing tests. Use the current Playwright configuration if it is already set up.
  2. For a new npm setup, the official starting command is npm init playwright@latest. For pnpm or yarn, use the corresponding command in the guide.
  3. Agree on the test folder and browser installation. Preserve existing build settings.
  4. Start the local website and run npx playwright test. Open the HTML report with npx playwright show-report.

How to use it in Codex

Codex writes and runs tests through the project terminal. This is a testing library, not a required MCP plugin. Testing a specific site needs an accessible URL, a scenario and, where necessary, a practice account.

Useful instructions

The website-change verification step uses Playwright Test to help preserve working features. The bug-fixing plan explains how to reproduce a failure and confirm the fix. Follow the official guide to retain these checks for future updates.

How to check the result

Test the outcome, such as a saved enquiry or expected response, rather than just the presence of a button. Include an error case and a repeated submission. When a test fails, inspect the error and screenshot before increasing its timeout. Use test mode for payment flows.

Prompt for Codex

Paste this into Codex with the project open. It will find the settings and prepare checks for the main user action.

Prepare repeatable website checks with Playwright Test. Find the project, instructions, startup procedure and existing tests. First establish the main user action and practice test data. If Playwright is not configured, propose installation using https://playwright.dev/docs/intro and carry it out after approval. Check the successful scenario, an error and a repeated action, keyboard access and a mobile viewport. Verify outcomes, not just visible elements. Run the tests, investigate failures and save a report with real screenshots. Do not perform real payments or send messages during testing.
In this article
Saved