send_command_to_electron
Send JavaScript commands to Electron apps via Chrome DevTools Protocol. Interact with UI elements, fill forms, navigate routes, execute custom code, and debug page structures with structured arguments.
Instructions
Send JavaScript commands to any running Electron application via Chrome DevTools Protocol.
Enhanced UI interaction commands:
- 'find_elements': Analyze all interactive elements (buttons, inputs, selects) with their properties
- 'click_by_text': Click elements by their visible text, aria-label, or title
- 'click_by_selector': Securely click elements by CSS selector
- 'fill_input': Fill input fields by selector, placeholder text, or associated label
- 'select_option': Select dropdown options by value or text
- 'send_keyboard_shortcut': Send keyboard shortcuts like 'Ctrl+N', 'Meta+N', 'Enter', 'Escape'
- 'navigate_to_hash': Safely navigate to hash routes (e.g., '#create', '#settings')
- 'get_page_structure': Get organized overview of page elements (buttons, inputs, selects, links)
- 'debug_elements': Get debugging info about buttons and form elements on the page
- 'verify_form_state': Check current form state and validation status
- 'get_title', 'get_url', 'get_body_text': Basic page information
- 'eval': Execute custom JavaScript code with enhanced error reporting
IMPORTANT: Arguments must be passed as an object with the correct properties:
Examples:
- click_by_selector: {"selector": "button.submit-btn"}
- click_by_text: {"text": "Submit"}
- fill_input: {"placeholder": "Enter name", "value": "John Doe"}
- fill_input: {"selector": "#email", "value": "user@example.com"}
- send_keyboard_shortcut: {"text": "Enter"}
- eval: {"code": "document.title"}
Use 'get_page_structure' or 'debug_elements' first to understand available elements, then use specific interaction commands.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
args | No | Arguments for the command - must be an object with appropriate properties based on the command type | |
command | Yes | Command to send to the Electron process |