A testing framework to validate Feishu bot interactions and UI flows during development.
Install
mkdir -p .claude/skills/feishu-e2e-test && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3327" && unzip -o skill.zip -d .claude/skills/feishu-e2e-test && rm skill.zipInstalls to .claude/skills/feishu-e2e-test
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Local E2E debug and test framework for clawd-feishu plugin development. Use when debugging message flow, testing bot responses, verifying Feishu web UI interactions, or performing end-to-end validation of the OpenClaw-Feishu integration during development.Key capabilities
- →Interact with Feishu web interface via browser automation
- →Monitor bot message flows and responses
- →Validate end-to-end integration logic
- →Simulate user input for bot testing
How it works
It uses the agent-browser CLI to perform headless or headed browser interactions with the Feishu web messenger, allowing for automated testing of bot responses and tool calls.
Inputs & outputs
When to use feishu-e2e-test
- →Debugging bot message flows
- →Testing Feishu web UI interactions
- →Validating end-to-end integration logic
About this skill
Feishu E2E Test Framework
Local development testing using agent-browser CLI to interact with Feishu web app.
Prerequisites
- Feishu web logged in at
https://feishu.cn/next/messenger agent-browserCLI available- OpenClaw locally installed
- Feishu bot appid/secret given in chat or in .env
- User given bot name which will display in Feishu web UI
Important Notes
Every time you modify extension code, you MUST restart OpenClaw Gateway for changes to take effect.
# Restart gateway (required after code changes)
openclaw gateway restart
# Check if gateway is running
ps aux | grep openclaw
# View gateway logs
tail -f ~/.openclaw/logs/gateway.log
agent-browser Usage
Always use --headed mode so user can see the browser and help with login:
agent-browser --headed --session feishu-test open "https://feishu.cn/next/messenger"
Feishu Web UI Tips
Feishu web has complex UI that makes direct clicking unreliable. Use these strategies:
1. Use Search (Cmd+K) Instead of Clicking
Clicking on chat list items often misses or selects wrong item. Use global search:
# Open search
agent-browser --session feishu-test press "Meta+k"
# Type bot name letter by letter
agent-browser --session feishu-test press "o"
agent-browser --session feishu-test press "p"
agent-browser --session feishu-test press "e"
agent-browser --session feishu-test press "n"
# Select first result
agent-browser --session feishu-test press "Enter"
2. Focus Input with "/" Key
After entering a chat, press "/" to focus the message input:
agent-browser --session feishu-test press "/"
agent-browser --session feishu-test press "Backspace" # Remove the "/"
# Then type your message
3. Type Characters One by One
The type command often fails with special characters. Use press for each character:
# Instead of: agent-browser type "ping"
agent-browser --session feishu-test press "p"
agent-browser --session feishu-test press "i"
agent-browser --session feishu-test press "n"
agent-browser --session feishu-test press "g"
4. Chinese Characters Do NOT Work
Chinese characters cannot be typed with press command. Use English only:
# BAD - Chinese won't render
for char in $(echo "读取文档" | grep -o .); do
agent-browser --session feishu-test press "$char" # Will fail silently
done
# GOOD - Use English
for char in r e a d " " d o c; do
agent-browser --session feishu-test press "$char"
done
5. Typing Spaces
Spaces must be quoted as " ":
# Type "read doc"
for char in r e a d " " d o c; do
agent-browser --session feishu-test press "$char"
done
6. Typing Long Strings Efficiently
Use a for loop to type URLs or long text:
# Type a full URL
url="https://feishu.cn/docx/YOUR_DOC_TOKEN"
for char in $(echo "$url" | grep -o .); do
agent-browser --session feishu-test press "$char" 2>/dev/null || true
done
7. Avoid JS eval on Feishu
Do NOT use eval to set input values - it can break the page:
# BAD - will corrupt page
agent-browser eval "document.activeElement.innerText = 'text'"
# GOOD - use keyboard input
agent-browser press "t" && agent-browser press "e" ...
8. Full URLs Work Better Than IDs
When testing document tools, send full URLs rather than just document IDs:
# Better - bot recognizes as document link
"https://feishu.cn/docx/YOUR_DOC_TOKEN"
# Less reliable - may not trigger tool
"read YOUR_DOC_TOKEN"
Verifying Tool Calls
Log Patterns
Monitor gateway logs to verify tool execution:
tail -f ~/.openclaw/logs/gateway.log
Key log entries:
[feishu] received message from ...- incoming message[feishu] dispatching to agent- sent to agent[feishu] added typing indicator reaction- bot is processing[feishu] deliver called: text=...- agent response[feishu] dispatch complete- response sent
Verify Tool Usage
Ask bot explicitly to confirm tool usage:
use feishu_doc tool to read YOUR_DOC_TOKEN
Look for confirmation in response like:
"我已经用 Feishu Doc Tool 读过了这个文档"
Common Errors
Permission Error (99991672)
Access denied. One of the following scopes is required: [contact:contact.base:readonly...]
This means bot lacks contact permission. Doesn't affect core messaging but prevents resolving sender names.
Other Log Locations
# Error logs
tail -f ~/.openclaw/logs/gateway.err.log
# All log files
ls -la ~/.openclaw/logs/
# Raw agent session records (tool calls, responses, etc.)
ls ~/.openclaw/agents/main/sessions/
# View specific session
cat ~/.openclaw/agents/main/sessions/<session-id>.json
Test Workflow
- Start browser:
agent-browser --headed --session feishu-test open "https://feishu.cn/next/messenger" - User scans QR to login
- Search for bot:
Cmd+K→ type bot name →Enter - Focus input: press
/thenBackspace - Type message (English only, letter by letter)
- Press
Enterto send - Wait 10-20 seconds for response
- Take screenshot and check logs to verify
Testing feishu_doc Tool
# 1. Focus input
agent-browser --session feishu-test press "/" && \
agent-browser --session feishu-test press "Backspace"
# 2. Type full doc URL
url="https://feishu.cn/docx/YOUR_DOC_ID"
for char in $(echo "$url" | grep -o .); do
agent-browser --session feishu-test press "$char" 2>/dev/null || true
done
# 3. Send
agent-browser --session feishu-test press "Enter"
# 4. Wait and check logs
sleep 15 && tail -30 ~/.openclaw/logs/gateway.log
When not to use it
- →Production environment testing
- →Testing non-Feishu integrations
Prerequisites
Limitations
- →Cannot type Chinese characters using the press command
- →Requires manual restart of OpenClaw Gateway after code changes
How it compares
It enables automated, local E2E testing of bot behavior in a real browser environment rather than relying on unit tests or manual UI verification.
Compared to similar skills
feishu-e2e-test side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| feishu-e2e-test (this skill) | 1 | 6mo | Review | Advanced |
| webapp-testing | 353 | 3mo | Review | Intermediate |
| dev-browser | 53 | 4mo | Review | Intermediate |
| playwright-browser-automation | 29 | 7mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by m1heng
View all by m1heng →You might also like
webapp-testing
anthropics
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
dev-browser
SawyerHood
Browser automation with persistent page state. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, or automate browser workflows. Trigger phrases include "go to [url]", "click on", "fill out the form", "take a screenshot", "scrape", "automate", "test the website", "log into", or any browser interaction request.
playwright-browser-automation
lackeyjb
Complete browser automation with Playwright. Auto-detects dev servers, writes clean test scripts to /tmp. Test pages, fill forms, take screenshots, check responsive design, validate UX, test login flows, check links, automate any browser task. Use when user wants to test websites, automate browser interactions, validate web functionality, or perform any browser-based testing.
windows-ui-automation
martinholovsky
Expert in Windows UI Automation (UIA) and Win32 APIs for desktop automation. Specializes in accessible, secure automation of Windows applications including element discovery, input simulation, and process interaction. HIGH-RISK skill requiring strict security controls for system access.
unity-mcp-orchestrator
CoplayDev
Orchestrate Unity Editor via MCP (Model Context Protocol) tools and resources. Use when working with Unity projects through MCP for Unity - creating/modifying GameObjects, editing scripts, managing scenes, running tests, or any Unity Editor automation. Provides best practices, tool schemas, and workflow patterns for effective Unity-MCP integration.
agent-browser
vercel-labs
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.