diff --git a/src/context.ts b/src/context.ts index fda43f9..ecf66b9 100644 --- a/src/context.ts +++ b/src/context.ts @@ -89,7 +89,7 @@ export class Context { currentTabOrDie(): Tab { if (!this._currentTab) - throw new Error('No current snapshot available. Capture a snapshot of navigate to a new location first.'); + throw new Error('No current snapshot available. Capture a snapshot or navigate to a new location first.'); return this._currentTab; } diff --git a/tests/cdp.spec.ts b/tests/cdp.spec.ts index a5a58c2..7a3492b 100644 --- a/tests/cdp.spec.ts +++ b/tests/cdp.spec.ts @@ -38,7 +38,7 @@ test('cdp server reuse tab', async ({ cdpServer, startClient, server }) => { element: 'Hello, world!', ref: 'f0', }, - })).toHaveTextContent(`Error: No current snapshot available. Capture a snapshot of navigate to a new location first.`); + })).toHaveTextContent(`Error: No current snapshot available. Capture a snapshot or navigate to a new location first.`); expect(await client.callTool({ name: 'browser_snapshot',