# explorbot-debug > Debug failed Explorbot interactions. Analyzes Langfuse exports or log files to find why tests failed and suggests Knowledge fixes. - Author: Michael Bodnarchuk - Repository: testomatio/explorbot - Version: 20260208012034 - Stars: 5 - Forks: 0 - Last Updated: 2026-02-08 - Source: https://github.com/testomatio/explorbot - Web: https://mule.run/skillshub/@@testomatio/explorbot~explorbot-debug:20260208012034 --- --- name: explorbot-debug description: Debug failed Explorbot interactions. Analyzes Langfuse exports or log files to find why tests failed and suggests Knowledge fixes. --- # Explorbot Debug Debug failed Explorbot test sessions by analyzing execution traces. ## Step 1: Get Session Data Ask the user: > Please provide ONE of: > 1. **Langfuse JSON export** — Path to exported `tester.loop` trace from Langfuse > 2. **Nothing** — I'll analyze `output/explorbot.log` for the latest session ### If JSON file provided: Use jq to extract key information: ```bash # Get all tool calls and their results jq '[.spans[] | select(.name | startswith("ai.toolCall")) | {tool: .name, input: .input, output: .output}]' # Get prompts sent to AI jq '[.spans[] | select(.name == "ai.generateText") | .input.messages[-1].content]' # Find failed tool calls jq '[.spans[] | select(.output.success == false)]' # Get page URLs visited jq '[.spans[] | select(.input.url) | .input.url] | unique' ``` ### If no file provided: Read `output/explorbot.log` and find the latest session by looking for: - `Testing scenario:` — session start - `Test finished` or `Test stopped` — session end - Tool calls and their results - Error messages ## Step 2: Identify Issues Analyze the session for these failure patterns: ### Missing Context 🔍 AI made wrong decisions because it lacked information about the page. **Symptoms:** - Clicked wrong element (multiple similar elements) - Didn't know about hidden content (modals, dropdowns) - Wrong assumptions about form behavior - Didn't understand special controls (editors, custom widgets) **Example:** AI clicked "Delete" in wrong table row because it didn't know about container context. ### Wrong Prompts 📝 AI made incorrect assumptions based on how prompts were structured. **Symptoms:** - Misunderstood the scenario goal - Tried impossible actions - Wrong priority of elements to interact with - Didn't follow expected user flow **Example:** AI tried to create user before logging in because prompt didn't mention auth requirement. ### Wrong Tool Choice 🔧 AI picked incorrect tool for the situation. **Symptoms:** - Used `click()` when `form()` was needed - Used `type()` without focusing element first - Used `pressKey()` for multi-character input - Didn't use container context when multiple elements matched **Example:** AI used standard `type()` on a rich text editor that needed special handling. ## Step 3: Suggest Knowledge Fix Based on the identified issues, suggest creating a **Knowledge file**. ### Knowledge File Structure ```markdown --- url: /path/pattern/* wait: 1 # optional: seconds to wait after page load --- [Instructions for AI when visiting this page] ``` ### URL Patterns Recommend **general patterns** over specific URLs: | Instead of | Use | |------------|-----| | `/users/123` | `/users/*` | | `/projects/my-proj/settings` | `/projects/*/settings` | | `/admin/users/edit/5` | `/admin/users/*` | This way knowledge applies to all similar pages. ### What to Include in Knowledge **1. Credentials (if auth needed):** ```markdown Login credentials: - email: admin@example.com - password: secret123 ``` **2. Framework quirks:** ```markdown ## Framework Notes App uses [Framework]. Avoid auto-generated IDs. Prefer ARIA selectors or data-test attributes. ``` **3. Rich Text Editors:** Editors like Monaco, TinyMCE, CKEditor, Quill, ProseMirror, or Block Editors often need special handling: ```markdown ## Text Editor The content editor requires special interaction: \`\`\` [Provide CodeceptJS code for this specific editor] [May need: iframe switching, click to focus, clear content, etc.] \`\`\` ``` Analyze the editor type and provide appropriate instructions. Common patterns: - **Iframe-based:** Need `I.switchTo()` before interaction - **ContentEditable:** May need click + select all + type - **Block editors:** May need clicking specific blocks first **4. Custom Controls:** Dropdowns, sliders, date pickers, and custom widgets often need guidance: ```markdown ## Custom Dropdown This dropdown doesn't use standard