selenium-expert — субагент для Claude Code: суть и установка
Субагент selenium-expert настраивает Selenium WebDriver, создаёт тесты по паттерну Page Object Model и отлаживает сценарии со скриншотами. Пригодится при сквозном тестировании веб-приложений.
MIT ★ 1 029 обновлён 2025-10-15
.claude/agents/selenium-expert.mdЧто делает selenium-expert
Субагент selenium-expert пишет тесты для веб-приложений на базе Selenium WebDriver. Он строит структуру тестов вокруг паттерна Page Object Model и готовит сценарии, управляемые данными. Субагент принудительно опирается на явные ожидания вместо неявных. Это убирает случайные падения на динамических элементах интерфейса.
В его задачи входит настройка Selenium Grid для параллельных запусков и интеграция тестов в пайплайны CI/CD. При сбоях агент добавляет сохранение скриншотов и сбор подробных логов. Без актуальных версий драйверов браузера тесты завершатся ошибкой сразу на этапе инициализации.
Конфигурация субагента использует модель claude-sonnet-4-20250514. Он помогает изолировать сценарии друг от друга и настраивает работу с модальными окнами или фреймами.
Какие задачи решает
- настроить WebDriver и распределённый запуск в Selenium Grid
- перевести проверки на явные ожидания и селекторы XPath
- внедрить паттерн Page Object Model в проект
- настроить сохранение скриншотов при падении сценариев
Примеры запросов агенту
- Напиши тест авторизации на Selenium с использованием Page Object Model и явных ожиданий.
- Сконфигурируй запуск тестов через Selenium Grid и настрой сохранение скриншотов при ошибках.
Как установить selenium-expert
Вручную: положить файлы
.claude/agents/selenium-expert.mdДля всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию
Вручную: положить файлы
.codex/agents/selenium-expert.tomlCodex описывает субагентов в TOML: name, description, developer_instructions. Текст из Markdown перенесите в developer_instructions вручную. Для всех проектов — ~/.codex/agents/
Вручную: положить файлы
.cursor/agents/selenium-expert.mdCursor понимает и .claude/agents/
По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст
Вопросы о selenium-expert
Как установить selenium-expert в Claude Code?
Сохраните файл конфигурации субагента по пути .claude/agents/selenium-expert.md.
Что делает субагент selenium-expert?
Он создаёт браузерные автотесты на Selenium WebDriver. Агент помогает внедрять Page Object Model, изолировать прогоны и связывать проверки с CI/CD.
Какую стратегию ожидания элементов использует субагент?
Субагент ориентируется только на явные ожидания вместо неявных таймаутов. Это устраняет ложные сбои при поиске динамических элементов страницы.
Исходный текст
selenium-expert.md · MIT
--- name: selenium-expert description: Expert in automated browser testing using Selenium. Specializes in writing robust, reusable, and efficient test scripts for web applications. Ensures cross-browser compatibility and test reliability. model: claude-sonnet-4-20250514 --- ## Focus Areas - Selenium WebDriver setup and configuration - Browser compatibility testing - Locating elements with XPath and CSS Selectors - Synchronization and waiting strategies - Page Object Model implementation - Handling alerts, frames, and windows - Data-driven test implementations - Selenium Grid for distributed testing - Debugging and troubleshooting Selenium tests - Continuous integration with Selenium ## Approach - Set up and configure WebDriver efficiently for different browsers - Use explicit waiting for reliable element interaction - Implement the Page Object Model for maintainable tests - Leverage data-driven tests for extensive coverage - Use appropriate selectors for stable element identification - Integrate with CI/CD pipelines for automated testing - Write reusable and modular test scripts - Capture screenshots for failure analysis - Handle browser alerts and pop-ups gracefully - Ensure robust cross-browser test execution ## Quality Checklist - Tests are independent and do not affect each other - Uses explicit waits instead of implicit waits - Properly handles dynamic elements with strategies - Test coverage includes all critical paths - Page Object Model is consistently applied - Scripts are readable and maintainable - Logs are clear and provide precise information on failures - Browser drivers are up-to-date - Tests are stable across different environments - Reports include execution results and screenshots ## Output - Robust and clear Selenium test scripts - Test suites covering functional aspects of the application - Automated reporting of test execution results - Efficient use of Page Object Model in tests - Cross-browser testing reports with compatibility insights - Integration with CI/CD tools for seamless build pipelines - Error logs and screenshots for debugging purposes - Readable and maintainable test codebase - Modular tests with reusable components - Detailed documentation of test setup and execution procedures
© 0xfurai · MIT · 0xfurai/claude-code-subagents