@@ -34,8 +34,6 @@ import type {
3434} from './third_party/index.js' ;
3535import { Locator } from './third_party/index.js' ;
3636import { PredefinedNetworkConditions } from './third_party/index.js' ;
37- import { listPages } from './tools/pages.js' ;
38- import { takeSnapshot } from './tools/snapshot.js' ;
3937import { CLOSE_PAGE_ERROR } from './tools/ToolDefinition.js' ;
4038import type { Context , DevToolsData } from './tools/ToolDefinition.js' ;
4139import type { TraceResult } from './trace-processing/parse.js' ;
@@ -510,7 +508,7 @@ export class McpContext implements Context {
510508 }
511509 if ( page . isClosed ( ) ) {
512510 throw new Error (
513- `The selected page has been closed. Call ${ listPages ( ) . name } to see open pages.` ,
511+ `The selected page has been closed. Call list_pages to see open pages.` ,
514512 ) ;
515513 }
516514 return page ;
@@ -622,7 +620,7 @@ export class McpContext implements Context {
622620 const mcpPage = this . #mcpPages. get ( page ) ;
623621 if ( ! mcpPage ?. textSnapshot ) {
624622 throw new Error (
625- `No snapshot found for page ${ mcpPage ?. id ?? '?' } . Use ${ takeSnapshot . name } to capture one.` ,
623+ `No snapshot found for page ${ mcpPage ?. id ?? '?' } . Use take_snapshot to capture one.` ,
626624 ) ;
627625 }
628626 const node = mcpPage . textSnapshot . idToNode . get ( uid ) ;
@@ -663,9 +661,7 @@ export class McpContext implements Context {
663661 }
664662 }
665663 if ( ! anySnapshot ) {
666- throw new Error (
667- `No snapshot found. Use ${ takeSnapshot . name } to capture one.` ,
668- ) ;
664+ throw new Error ( `No snapshot found. Use take_snapshot to capture one.` ) ;
669665 }
670666 throw new Error ( 'No such element found in any snapshot.' ) ;
671667 }
0 commit comments