{
  "slug": "playwright-page-consolemessages-and-page-pageerrors-accept-a-filter-option-0e11d98701a7",
  "title": "Playwright page.consoleMessages() and page.pageErrors() accept a filter option",
  "tools": [
    "playwright"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-04-01T00:27:06.000Z",
  "announced_at": "2026-04-01T00:27:06.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When a browser test retrieves console messages or page errors, pass `filter` in the options object to control which entries are returned.",
    "examples": [
      "await page.consoleMessages({ filter: 'since-navigation' });",
      "await page.pageErrors({ filter: 'since-navigation' });"
    ],
    "gotchas": [
      "Version: v1.59.0",
      "filter: Optional value: `all` or `since-navigation`. Controls which messages or errors are returned; the docs do not define the individual values' behavior.",
      "Prerequisite: The filter option was added in Playwright v1.59."
    ]
  },
  "why_it_matters": "When retrieving console messages or page errors in a browser test, filter the returned entries.",
  "sources": [
    "https://github.com/microsoft/playwright/releases/tag/v1.59.0",
    "https://playwright.dev/docs/api/class-page#page-console-messages",
    "https://playwright.dev/docs/api/class-page#page-page-errors"
  ],
  "rank": 0.9503,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v1+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "backfill-20261007",
    "verdict_id": "backfill-20261007:backfill-20261007-c895c80e51052b9f-11:gate",
    "evidence_hash": "30b837f8ffc622b81590dae29ec5e3dfaebcd07c790a4f14dc0a6b78c001ee6a"
  },
  "review": {
    "draft_hash": "cfa9e8d961743f29928d5ab4e686154a0b1033b489962df2939b35c6eac3fe8f",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "backfill-20261007:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.95 >= 0.9; 2 needed) and Jev gave 0.69 (>= 0.6 needed)."
  }
}
