{
  "slug": "k6-browser-adds-framelocator-bd6e7eef3129",
  "title": "k6/browser adds frameLocator()",
  "tools": [
    "k6"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-02-10T09:12:21.000Z",
  "announced_at": "2026-02-10T09:12:21.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When a k6 browser test needs to interact with iframe content, call `frameLocator(selector)` with a selector that resolves to the iframe. Chain another `frameLocator()` for nested frames, then use `locator()` to target and interact with elements inside.",
    "examples": [
      "import { browser } from 'k6/browser';\n\nexport const options = {\n  scenarios: {\n    browser: {\n      executor: 'shared-iterations',\n      options: { browser: { type: 'chromium' } },\n    },\n  },\n};\n\nexport default async function () {\n  const page = await browser.newPage();\n  try {\n    await page.goto('<URL>');\n    const frame = page.frameLocator('<iframe-selector>');\n    await frame.locator('<element-selector>').click();\n    const nested = page.frameLocator('<outer-iframe-selector>')\n      .frameLocator('<inner-iframe-selector>');\n    await nested.locator('<nested-element-selector>').click();\n  } finally {\n    await page.close();\n  }\n}"
    ],
    "gotchas": [
      "Version: v1.6.0",
      "selector (required): String selector that resolves to an iframe element; used by `frameLocator(selector)` to return a FrameLocator for that iframe.",
      "Prerequisite: Configure a browser scenario with a browser type such as `chromium` and import `browser` from `k6/browser`."
    ]
  },
  "why_it_matters": "Interact with elements inside an iframe while testing a web application with k6 browser.",
  "sources": [
    "https://github.com/grafana/k6/releases/tag/v1.6.0",
    "https://grafana.com/docs/k6/latest/javascript-api/k6-browser/locator/framelocator/"
  ],
  "rank": 0.98024,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-4d59ff63232066fe-3:gate",
    "evidence_hash": "214d637601ab12859a942e0dfb0964627863702fc979acbb4c496833c029e4b8"
  },
  "review": {
    "draft_hash": "2ac4bda08c59babd89b4a0b705bd8f5af1649fba83da649351ce6ce42151877f",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.80 (>= 0.6 needed)."
  }
}
