MCPcopy Create free account
hub / github.com/ChromeDevTools/chrome-devtools-mcp / getFirstText

Function getFirstText

tests/index.test.ts:379–388  ·  view source on GitHub ↗
(
      result: Awaited<ReturnType<Client['callTool']>>,
    )

Source from the content-addressed store, hash-verified

377
378 describe('Dialogs', {concurrency: true}, () => {
379 function getFirstText(
380 result: Awaited<ReturnType<Client['callTool']>>,
381 ): string {
382 const first = Array.isArray(result.content)
383 ? result.content[0]
384 : undefined;
385 return first && 'text' in first && typeof first.text === 'string'
386 ? first.text
387 : '';
388 }
389
390 async function createNewPageAndTriggerDialog(client: Client) {
391 // Navigate to a page with a button that triggers a dialog on click

Callers 2

index.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected