# Codex Website Browser Tests for Booking Failures

> A Codex website browser test should exercise a failed booking as a visitor sees it. Route a local fixture to a full-slot or temporary service response.

URL: https://www.matthewswong.com/en/blog/codex-website-failure-state-browser-test/

- Author: Matthews Wong (https://www.matthewswong.com/en/about/)
- Published: 2026-12-03
- Updated: 2026-12-03
- Category: Web Development

> **Key takeaway:** A Codex website browser test should exercise a failed booking as a visitor sees it. Route a local fixture to a full-slot or temporary service response, then check that the interface shows the right message and keeps useful input. Repeat successful submission to prove the recovery path works.

Which failures should be tested separately?

Use a known full slot and a transient service failure as separate cases. The first should guide the visitor to another time. The second may offer a retry using values already entered.

How should the agent reach the error?

Use the standard route and form controls with synthetic booking data. Wait for the user-facing outcome and capture the message and focused element. The test should exercise the same route a visitor takes from landing page to confirmation.

What must survive a retry?

Preserve unrelated valid form fields so the user only corrects the time or retries submission. Check that the previous error clears at the appropriate moment. Verify the confirmation contains the updated slot.

Where can visual checks help?

Look for error text pushed outside a scrollable region or underneath a fixed element at the mobile width. Use the real Indonesian and English copy. Compare screenshots with the same viewport and local fixture to make differences reproducible.

Which controls belong in the test?

Navigate with the keyboard and check the visible focus indicator. Exercise the retry by keyboard and by pointer where useful. Both should reach the same synthetic success state.

What proof belongs in the pull request?

Include the exact fixture outcome, route, viewport and whether a retry succeeded. A screenshot of the error is useful alongside a trace of the follow-up. Review the initial failure and the successful recovery as a pair.

## Sources and further reading

- OpenAI frontend workflow guide
- OpenAI announcement on Codex images and browser use
- Claude Code overview
- Playwright visual comparisons

## Source links

- https://developers.openai.com/blog/designing-delightful-frontends-with-gpt-5-4
- https://openai.com/index/codex-for-almost-everything/
- https://code.claude.com/docs/en/overview
- https://playwright.dev/docs/test-snapshots

## FAQ

### Which failures should be tested separately?

Use a known full slot and a transient service failure as separate cases. The first should guide the visitor to another time. The second may offer a retry using values already entered.

### How should the agent reach the error?

Use the standard route and form controls with synthetic booking data. Wait for the user-facing outcome and capture the message and focused element. The test should exercise the same route a visitor takes from landing page to confirmation.

### What must survive a retry?

Preserve unrelated valid form fields so the user only corrects the time or retries submission. Check that the previous error clears at the appropriate moment. Verify the confirmation contains the updated slot.

### Where can visual checks help?

Look for error text pushed outside a scrollable region or underneath a fixed element at the mobile width. Use the real Indonesian and English copy. Compare screenshots with the same viewport and local fixture to make differences reproducible.

### Which controls belong in the test?

Navigate with the keyboard and check the visible focus indicator. Exercise the retry by keyboard and by pointer where useful. Both should reach the same synthetic success state.

---

- HTML version: https://www.matthewswong.com/en/blog/codex-website-failure-state-browser-test/
- Bahasa Indonesia: https://www.matthewswong.com/id/blog/codex-website-failure-state-browser-test/
- Site index for agents: https://www.matthewswong.com/llms.txt
- Sitemap: https://www.matthewswong.com/sitemap.xml
- API description (OpenAPI): https://www.matthewswong.com/openapi.json
