add_commands
Insert browser automation commands into existing tests at specified positions to modify test sequences for Selenium-based workflows.
Instructions
Add one or more commands to a test at a specific index. Commands use camelCase names (e.g., "click", "type", "open", "executeScript").
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| test_id | Yes | The test ID to add commands to | |
| index | Yes | The 0-based index at which to insert commands | |
| commands | Yes | Array of commands to add |
Implementation Reference
- src/index.ts:21-25 (handler)The handler dispatches the tool call (including 'add_commands') to the BridgeClient.
server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params try { const result = (await bridge.call(name, (args as Record<string, unknown>) || {})) as Record<string, unknown> - src/tools.ts:169-198 (registration)Tool registration and schema definition for 'add_commands'.
{ name: 'add_commands', description: 'Add one or more commands to a test at a specific index. Commands use camelCase names (e.g., "click", "type", "open", "executeScript").', inputSchema: { type: 'object' as const, properties: { test_id: { type: 'string', description: 'The test ID to add commands to', }, index: { type: 'number', description: 'The 0-based index at which to insert commands', }, commands: { type: 'array', items: { type: 'object', properties: { command: { type: 'string' }, target: { type: 'string' }, value: { type: 'string' }, }, required: ['command'], }, description: 'Array of commands to add', }, }, required: ['test_id', 'index', 'commands'],