File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import {CLOSE_PAGE_ERROR} from './tools/ToolDefinition.js';
2525import type { Context } from './tools/ToolDefinition.js' ;
2626import type { TraceResult } from './trace-processing/parse.js' ;
2727import { WaitForHelper } from './WaitForHelper.js' ;
28+ import { takeSnapshot } from './tools/snapshot.js' ;
2829
2930export interface TextSnapshotNode extends SerializedAXNode {
3031 id : string ;
@@ -261,7 +262,7 @@ export class McpContext implements Context {
261262
262263 async getElementByUid ( uid : string ) : Promise < ElementHandle < Element > > {
263264 if ( ! this . #textSnapshot?. idToNode . size ) {
264- throw new Error ( ' No snapshot found. Use browser_snapshot to capture one' ) ;
265+ throw new Error ( ` No snapshot found. Use ${ takeSnapshot . name } to capture one.` ) ;
265266 }
266267 const [ snapshotId ] = uid . split ( '_' ) ;
267268
You can’t perform that action at this time.
0 commit comments