(args: z.infer<typeof FillArgs>, _ctx: ToolContext)
| 160 | argsSchema = FillArgs; |
| 161 | |
| 162 | async execute(args: z.infer<typeof FillArgs>, _ctx: ToolContext): Promise<ToolResult> { |
| 163 | try { |
| 164 | const s = await getSession(); |
| 165 | await s.page.fill(args.selector, args.value, { timeout: args.timeout_ms ?? 5000 }); |
| 166 | return { content: `Filled ${args.selector} with ${args.value.length} char(s)` }; |
| 167 | } catch (e: any) { |
| 168 | return { content: `[BROWSER_ERROR] fill failed for "${args.selector}": ${e?.message ?? String(e)}`, isError: true }; |
| 169 | } |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | const ScreenshotArgs = z.object({ |
nothing calls this directly
no test coverage detected