ワンクリックで
web-test-wallet-sign
// Handle MetaMask signature and transaction popups during Web3 DApp testing - approve signatures, send transactions, call contracts. Detects popup type and handles gas errors.
// Handle MetaMask signature and transaction popups during Web3 DApp testing - approve signatures, send transactions, call contracts. Detects popup type and handles gas errors.
Generate persistent test cases from project analysis, or add individual test cases interactively. Supports full project analysis or adding single test cases via prompt description with browser exploration.
Execute tests from persistent test cases. Reads ./tests/ directory, runs cleanup, wallet setup (if Web3), executes tests, and generates report.
Analyze ANY web project - detect if Web3 DApp, research dependencies via WebSearch, understand business functions from code AND UI screenshots, generate test requirements.
Connect wallet to Web3 DApp - navigate to DApp, click Connect Wallet, approve in MetaMask popup, verify connection. Can be used as a test case or as a precondition for other tests.
Clean up test sessions - kill browsers, stop dev servers, free ports, and optionally remove test data. Use this BEFORE starting new tests or AFTER completing tests.
Generate test report with clear visual indicators - ✅ for pass, ❌ for fail. Summarize results, document failures, provide recommendations.
| name | web-test-wallet-sign |
| description | Handle MetaMask signature and transaction popups during Web3 DApp testing - approve signatures, send transactions, call contracts. Detects popup type and handles gas errors. |
| license | MIT |
| compatibility | Node.js 18+, Playwright |
| metadata | {"author":"AI Agent","version":"1.0.0"} |
| allowed-tools | Bash Read |
Handle MetaMask signature requests and transaction popups during Web3 DApp testing.
SKILL_DIR="<path-to-this-skill>"
# Handle any MetaMask popup (auto-detects type)
node $SKILL_DIR/scripts/wallet-sign-helper.js wallet-sign --wallet --headed --keep-open
SKILL_DIR="<path-to-this-skill>"
# Auto-detect popup type and handle appropriately
node $SKILL_DIR/scripts/wallet-sign-helper.js wallet-sign --wallet --headed --keep-open
Output for Signature:
{
"success": true,
"type": "signature",
"subtype": "personal_sign",
"action": "approved",
"message": "Signature request approved"
}
Output for Transaction (success):
{
"success": true,
"type": "transaction",
"action": "approved",
"txHash": "0x...",
"message": "Transaction sent successfully"
}
Output for Transaction (gas error):
{
"success": false,
"type": "transaction",
"action": "failed",
"error": "insufficient_gas",
"message": "Transaction failed: insufficient funds for gas"
}
# Reject any popup (for testing negative flows)
node $SKILL_DIR/scripts/wallet-sign-helper.js wallet-reject --wallet --headed --keep-open
# Check if there's a pending popup without acting
node $SKILL_DIR/scripts/wallet-sign-helper.js wallet-check --wallet --headed --keep-open
| Command | Description |
|---|---|
wallet-sign | Auto-detect and handle popup (approve signatures, check gas for tx) |
wallet-reject | Reject any pending popup |
wallet-check | Check popup status without acting |
When a transaction or contract call fails due to insufficient gas:
{
"success": false,
"type": "transaction",
"error": "insufficient_gas",
"details": {
"required": "0.01 ETH",
"available": "0.001 ETH"
},
"action": "test_failed",
"message": "Insufficient funds for gas - test marked as FAILED"
}
Important: Gas errors should fail the current test case in web-test.
{
"success": false,
"error": "network_error",
"message": "Failed to broadcast transaction"
}
During test execution, when a MetaMask popup is detected:
success: true → continue testsuccess: false with error: insufficient_gas → FAIL testsuccess: false with other errors → retry or fail based on test configThe skill detects popup type by analyzing the MetaMask notification page: