selenium-testing
БесплатноБез исполняемых скриптовНе проверенUse for any question or task about Selenium WebDriver tests in Java, Python, C# or other bindings, including quick how-to questions and one pasted test to…
от testland★ 18 звёзд на GitHubОб этом скилле
selenium-testing
Overview
Selenium WebDriver is a W3C-standard browser automation protocol with the broadest language support: Java, Python, JavaScript, C#, Ruby, Kotlin, PHP. Since 4.6 the bindings ship Selenium Manager, so a test no longer downloads or configures a browser driver itself (selenium-manager).
When to use
- The team has substantial existing Selenium investment; migration cost is prohibitive.
- The codebase is in a language with limited modern E2E support (e.g., older C# / Ruby / PHP projects).
- W3C standard adherence is contractually required.
- Cross-browser including IE11 is required (rare; deprecated).
For new projects in 2026+: pick Playwright or Cypress unless constraints dictate Selenium.
How to use
- Pick the language binding that matches the stack (Java, Python, C#, Ruby, Kotlin, PHP) and add the Selenium dependency. Selenium Manager resolves drivers; drop WebDriverManager and hardcoded driver paths.
- Instantiate a driver in setup and
quit()it in teardown so no browser process leaks. - Prefer stable
By.cssSelector/data-testidlocators; keep XPath for relationship queries only. - Replace every
Thread.sleep()withWebDriverWait+ExpectedConditionsso the test waits on a condition, not a clock. Never mix implicit and explicit waits. - Author one test per user flow with fresh per-test setup, and move page knowledge into page objects that never assert.
- Save a screenshot on failure and fail on JavaScript errors captured over WebDriver BiDi.
- For breadth, point a
RemoteWebDriverat Selenium Grid (or a managed grid) to fan out across browsers. - Emit JUnit XML in CI (
target/surefire-reports/) and feed it tojunit-xml-analysis.
Step 1 - Install (Java + JUnit example)
<!-- pom.xml: versions current on Maven Central, 3 Nov 2026 -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.52.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>6.1.3</version>
<scope>test</scope>
</dependency>
No driver dependency is needed. Per selenium-manager, Selenium
Manager ships "out of the box with each Selenium release as of version
4.6", the bindings use it by default "so you do not need to download it
or add anything to your code", and if Chrome is not installed "the
current stable Chrome for Testing (CfT) release will be discovered,
downloaded, and cached" under ~/.cache/selenium. Cache that folder in
CI to skip the download on every run.
Upgrading an older suite: delete the webdrivermanager dependency,
every WebDriverManager.chromedriver().setup() call and every
webdriver.chrome.driver system property. They now fight Selenium
Manager instead of helping.
Selenium Manager on locked-down CI
Per selenium-manager:
- It is only a fallback. "Selenium Manager only operates as a
fallback: if no driver is provided". A
webdriver.chrome.driverproperty, WebDriverManager, or achromedriveralready on thePATHwins, which is how a runner image that auto-updates Chrome ends in "This version of ChromeDriver only supports Chrome version N". Remove all three (or setSE_SKIP_DRIVER_IN_PATH=true). - Pin the browser, not the driver.
options.setBrowserVersion("131")(orstable,beta,dev) makes Selenium Manager use that Chrome if installed, or download and cache Chrome for Testing 131, and resolve the matching chromedriver. The tests then run on the version QA signed off on, whatever the image updated to. - Proxy for downloads only. A proxy set in the browser options "is
used both by the browser and by Selenium Manager". When only the
downloads should go through it, set
SE_PROXY(orproxyinse-config.toml) instead. - No network at test time. Warm the cache in a stage that can
download, keep it in
SE_CACHE_PATH(default~/.cache/selenium), and run the tests withSE_OFFLINE=true("disabling network requests and downloads").SE_DRIVER_MIRROR_URL/SE_BROWSER_MIRROR_URLpoint at an internal mirror with the same layout. - Usage statistics are on by default. "Data collection is on by
default. To disable it, set the
SE_AVOID_STATSenvironment variable totrue" (oravoid-stats = trueinse-config.toml).
ChromeOptions o = new ChromeOptions();
o.setBrowserVersion("131"); // the version QA signed off on
o.addArguments("--headless=new");
driver = new ChromeDriver(o); // no driver path, no WebDriverManager
# build stage (network allowed): warm the cache
env: { SE_PROXY: "http://proxy.example:3128",
Установить selenium-testing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл selenium-testing?
Use for any question or task about Selenium WebDriver tests in Java, Python, C# or other bindings, including quick how-to questions and one pasted test to fix: explicit waits instead of sleeps, stable locators instead of absolute XPath, driver version errors (Selenium Manager), page objects, BiDi console errors, Grid in Docker and JUnit XML. New projects usually pick Playwright.
Как установить скилл selenium-testing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл selenium-testing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic