MCPcopy
hub / github.com/ChromeDevTools/chrome-devtools-mcp / getPageById

Method getPageById

src/McpContext.ts:511–517  ·  view source on GitHub ↗
(pageId: number)

Source from the content-addressed store, hash-verified

509 }
510
511 getPageById(pageId: number): McpPage {
512 const page = this.#mcpPages.values().find(mcpPage => mcpPage.id === pageId);
513 if (!page) {
514 throw new Error('No page found');
515 }
516 return page;
517 }
518
519 getPageId(page: Page): number | undefined {
520 return this.#mcpPages.get(page)?.id;

Callers 5

closePageMethod · 0.95
handleMethod · 0.80
script.tsFile · 0.80
pages.tsFile · 0.80
pages.test.tsFile · 0.80

Calls 1

findMethod · 0.45

Tested by

no test coverage detected