execute_test_step
Execute JavaScript/TypeScript in a live test environment to inspect updated DOM state and console logs, enabling interactive debugging of integration tests.
Instructions
Execute code directly in the connected test client and get back the updated DOM state and console logs. IMPORTANT: Before using this tool, call get_current_test_state first to check the 'availableContext' field, which lists all available APIs/variables you can use in your code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The JavaScript/TypeScript code to execute in the test environment. You can use any APIs/variables listed in the 'availableContext' field from get_current_test_state (e.g., screen, fireEvent, waitFor, userEvent, etc.). The code should only reference variables that are available in availableContext. | |
| testFile | No | Optional: specific test file (uses current if not provided) | |
| testName | No | Optional: specific test name (uses current if not provided) |