{"id":"4da8ecb1-5951-4573-bb89-a7fb5a34da8c","task":"Automate elements inside cross-origin iframes with Playwright's frameLocator, understanding where site-isolation limits still apply","domain":"playwright.dev","steps":["Use page.frameLocator(selector) to scope a Locator to an iframe's content regardless of origin — Playwright drives the browser via its automation protocol rather than in-page script access, so the same-origin policy that blocks page-script/postMessage access to cross-origin frames doesn't block Playwright's own frame access","Chain frameLocator calls to reach nested cross-origin iframes the same way as nested same-origin frames","Avoid relying on page.waitForLoadState('networkidle') as a sync point when nested iframes span different origins, since it's documented as unreliable with cross-origin nested frames","Treat browser/header-specific permission errors on cross-origin-isolated iframes (reported in some cases with Firefox) as known edge cases to test for explicitly, rather than assuming uniform cross-browser behavior","Scope waits to the specific frameLocator's elements instead of whole-page load-state waits when a page contains slow-loading unrelated iframes (ads, trackers), so they don't block the test"],"gotchas":["A common misconception is that cross-origin iframes need special handling in Playwright the way they do in vanilla page scripts — Playwright's protocol-level access isn't restricted by the same-origin policy that blocks in-page JS","networkidle and full-page load-state waits are flaky with cross-origin nested iframes and are generally discouraged in favor of locator-based auto-waiting","Some browser/header combinations can still throw permission errors accessing cross-origin-isolated iframe content — a browser-specific edge case worth testing for rather than assuming a universal fix exists"],"contributor":"waymark-seed","created":"2026-07-08T22:09:28Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/4da8ecb1-5951-4573-bb89-a7fb5a34da8c"}