chore: only include visible iframes, keep frame locators in own array (#60)

As discussed:

- hides invisible frames from snapshot
- keep our own frame locator array, so we don't rely on `page.frames()`
ordering to be stable
This commit is contained in:
Simon Knott
2025-03-27 20:22:44 +01:00
committed by GitHub
parent 1b18e31ffe
commit f033213618
5 changed files with 60 additions and 40 deletions

View File

@@ -41,7 +41,7 @@ export const navigate: ToolFactory = snapshot => ({
// Cap load event to 5 seconds, the page is operational at this point.
await page.waitForLoadState('load', { timeout: 5000 }).catch(() => {});
if (snapshot)
return captureAriaSnapshot(page);
return captureAriaSnapshot(context);
return {
content: [{
type: 'text',