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

Function getFirstText

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

Source from the content-addressed store, hash-verified

375
376 describe('Dialogs', {concurrency: true}, () => {
377 function getFirstText(
378 result: Awaited<ReturnType<Client['callTool']>>,
379 ): string {
380 const first = Array.isArray(result.content)
381 ? result.content[0]
382 : undefined;
383 return first && 'text' in first && typeof first.text === 'string'
384 ? first.text
385 : '';
386 }
387
388 async function createNewPageAndTriggerDialog(client: Client) {
389 // 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