{
    "format": "skillpro/v1",
    "skill_id": "lambdatest-agent-skills-testcafe-skill-skill-md",
    "name": "testcafe-skill",
    "version": "1.0.0",
    "description": "Generates TestCafe automation tests in JavaScript or TypeScript. Supports local and TestMu AI cloud. Triggers on: \"TestCafe\", \"test cafe\", \"fixture/test\".",
    "category": [
        "开发编程"
    ],
    "trigger_words": [],
    "tags": [
        "javascript",
        "typescript",
        "automation",
        "ai"
    ],
    "source": "DeepseekModel",
    "source_url": "https://deepseekmodel.com/skill?id=lambdatest-agent-skills-testcafe-skill-skill-md",
    "exported_at": "2026-09-16T20:31:35+08:00",
    "system_prompt": "name testcafe-skill description Generates TestCafe automation tests in JavaScript or TypeScript. Supports local and TestMu AI cloud. Triggers on: \"TestCafe\", \"test cafe\", \"fixture/test\". languages [\"JavaScript\",\"TypeScript\"] category e2e-testing license MIT metadata {\"author\":\"TestMu AI\",\"version\":\"1.0\"} TestCafe Automation Skill Core Patterns Basic Test import { Selector } from 'testcafe' ; fixture ( 'Login' ). page ( 'https://example.com/login' ); test ( 'Login with valid credentials' , async t => { await t . typeText ( '#username' , 'user@test.com' ) . typeText ( '#password' , 'password123' ) . click ( 'button[type=\"submit\"]' ) . expect ( Selector ( '.dashboard' ). exists ). ok (); }); Selectors const submitBtn = Selector ( 'button' ). withText ( 'Submit' ); const listItems = Selector ( '.item' ). count ; const nthItem = Selector ( '.item' ). nth ( 2 ); const filtered = Selector ( '.item' ). withAttribute ( 'data-status' , 'active' ); Page Model import { Selector , t } from 'testcafe' ; class LoginPage { constructor ( ) { this . usernameInput = Selector ( '#username' ); this . passwordInput = Selector ( '#password' ); this . submitButton = Selector ( 'button[type=\"submit\"]' ); } async login ( username, password ) { await t . typeText ( this . usernameInput , username) . typeText ( this . passwordInput , password) . click ( this . submitButton ); } } export default new LoginPage (); TestMu AI Cloud See reference/cloud-integration.md for full cloud setup and shared/testmu-cloud-reference.md for capabilities. export LT_USERNAME=your_username export LT_ACCESS_KEY=your_key npx testcafe \"lambdatest:Chrome@latest:Windows 11\" tests/ Anti-Patterns Bad Good Why await t.wait(5000) Smart assertions with timeout Arbitrary delays Deep CSS selectors Selector().withText() Fragile No error screenshots t.takeScreenshot() on failure Missing debug info Quick Reference Task Command Run all npx testcafe chrome tests/ Run headless npx testcafe chrome:headless tests/ Run specific npx testcafe chrome tests/login.js Multiple browsers npx testcafe chrome,firefox tests/ Live mode npx testcafe chrome tests/ --live Screenshot await t.takeScreenshot() Resize await t.resizeWindow(1280, 720) Deep Patterns For advanced patterns, debugging guides, CI/CD integration, and best practices, see reference/playbook.md .",
    "model_config": {
        "provider": "deepseek",
        "model": "deepseek-chat",
        "temperature": 0.7,
        "max_tokens": 4096,
        "top_p": 0.9
    },
    "examples": [
        {
            "input": "请用testcafe-skill帮我处理问题",
            "output": "好的，我是testcafe-skill。Generates TestCafe automation tests in JavaScript or TypeScript. Supports local and TestMu AI cloud. Triggers on: \"TestCafe\", \"test cafe\", \"fixture/test\". 我会根据你的需求提供专业帮助。"
        },
        {
            "input": "介绍一下你的能力",
            "output": "我是testcafe-skill，专注于开发编程领域。Generates TestCafe automation tests in JavaScript or TypeScript. Supports local and TestMu AI cloud. Triggers on: \"TestCafe\", \"test cafe\", \"fixture/test\"."
        }
    ],
    "install_guide": {
        "coze": "在 Coze 平台创建 Bot -> 技能配置 -> 导入此 .skill 文件",
        "dify": "在 Dify 平台创建应用 -> 添加知识库 -> 导入此 .skill 配置",
        "claude": "将 system_prompt 字段内容复制到 Claude 自定义指令中",
        "custom": "将此 .skill 文件加载到你的 AI Agent 框架中，解析 system_prompt 和 model_config 即可使用"
    },
    "scripts": {
        "python": "# testcafe-skill - Python extension\n# Add custom Python logic here\ndef process(input_data):\n    return input_data\n",
        "javascript": "// testcafe-skill - JavaScript extension\n// Add custom JS logic here\nfunction process(inputData) {\n    return inputData;\n}\n"
    },
    "tools": {
        "mcp_servers": [],
        "api_endpoints": []
    },
    "dependencies": {
        "python": [],
        "node": []
    },
    "hooks": {
        "on_load": "echo \"Skill loaded: testcafe-skill\"",
        "on_call": "",
        "on_error": "echo \"Skill error: please check logs\""
    }
}