Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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

  1. 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.
  2. Instantiate a driver in setup and quit() it in teardown so no browser process leaks.
  3. Prefer stable By.cssSelector / data-testid locators; keep XPath for relationship queries only.
  4. Replace every Thread.sleep() with WebDriverWait + ExpectedConditions so the test waits on a condition, not a clock. Never mix implicit and explicit waits.
  5. Author one test per user flow with fresh per-test setup, and move page knowledge into page objects that never assert.
  6. Save a screenshot on failure and fail on JavaScript errors captured over WebDriver BiDi.
  7. For breadth, point a RemoteWebDriver at Selenium Grid (or a managed grid) to fan out across browsers.
  8. Emit JUnit XML in CI (target/surefire-reports/) and feed it to junit-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.driver property, WebDriverManager, or a chromedriver already on the PATH wins, 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 set SE_SKIP_DRIVER_IN_PATH=true).
  • Pin the browser, not the driver. options.setBrowserVersion("131") (or stable, 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 (or proxy in se-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 with SE_OFFLINE=true ("disabling network requests and downloads"). SE_DRIVER_MIRROR_URL / SE_BROWSER_MIRROR_URL point 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_STATS environment variable to true" (or avoid-stats = true in se-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",
Полный SKILL.md на GitHub

Установить selenium-testing в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

.tessl-plugin/plugin.jsonevals/cross-browser-report-that-only-ever-ran-chrome/criteria.jsonevals/cross-browser-report-that-only-ever-ran-chrome/task.mdevals/pipeline-stayed-green-through-a-broken-release/criteria.jsonevals/pipeline-stayed-green-through-a-broken-release/task.mdevals/selenium-bidi-errors/criteria.jsonevals/selenium-bidi-errors/task.mdevals/selenium-grid-files/criteria.jsonevals/selenium-grid-files/task.mdevals/selenium-manager-locked-ci/criteria.jsonevals/selenium-manager-locked-ci/task.mdevals/selenium-mixed-waits/criteria.jsonevals/selenium-mixed-waits/task.mdevals/selenium-shadow-frames/criteria.jsonevals/selenium-shadow-frames/task.mdevals/suite-only-fails-on-the-shared-ci-runner/criteria.jsonevals/suite-only-fails-on-the-shared-ci-runner/task.mdevals/two-teams-want-the-same-browser-stack/criteria.jsonevals/two-teams-want-the-same-browser-stack/task.mdevals/vendor-widget-broke-every-locator-again/criteria.jsonevals/vendor-widget-broke-every-locator-again/task.mdreferences/language-bindings.md

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), без исполняемых скриптов.

Похожие скиллы

Сравнить selenium-testing с