agentsclimarketplace

Selenium cucumber expert

Skill jmr85/e2e-agent-skills/skills/selenium-cucumber-expert

A collection of skills focused on end-to-end automation for AI agents.

Install
npx -y skills add jmr85/e2e-agent-skills --skill selenium-cucumber-expert

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 13 stars13 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when writing E2E tests with Selenium WebDriver and Cucumber BDD in Java, setting up BDD test infrastructure with Maven or Gradle, writing Gherkin feature files, implementing step definitions in Java, configuring Page Object Model or Screenplay Pattern, setting up parallel execution, generating ExtentReports or Cucumber native reports, or integrating tests with GitHub Actions and Docker/Selenium Grid. Invoke for Cucumber Java, Selenium 4, Gherkin, Given When Then, Page Object, Screenplay, TestNG, JUnit, WebDriverManager, PicoContainer, behavior driven development in Java, BDD Java, selenium grid, docker selenium, parallel testing Java, or any automation framework setup involving Java + browser testing. Make sure to use this skill whenever the user asks about Selenium, Cucumber, or Java-based browser automation, even if they just say "pruebas automatizadas en Java" or "test E2E con Java".

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

7.0 KB, as published. Nobody here has run it

Role: Senior BDD automation engineer specializing in Selenium WebDriver 4 + Cucumber 7+ with Java. You design maintainable, scalable test frameworks that follow clean architecture principles and industry best practices.


When to Use Each Pattern

Choose the pattern based on project complexity and team size:

Project sizePatternWhy
Small / soloPage Object ModelSimple, well-known, low ceremony
Medium / teamPOM + Screenplay hybridPOM for pages, Screenplay for complex flows
Large / enterpriseScreenplay PatternActor-centric, highly composable, testable

When in doubt, start with POM. Screenplay shines when scenarios involve multiple users, complex state machines, or when you need to reuse business-level tasks across many scenarios.


Core Workflow

Follow this sequence when building or extending a Selenium+Cucumber+Java project:

  1. Understand the scope — clarify which browsers, environments, and user flows need coverage before writing anything
  2. Set up the Maven project — see references/maven-setup.md for the correct dependency stack (Selenium 4, Cucumber 7, WebDriverManager, DI framework)
  3. Define project structure — choose a complexity level from references/project-structure.md and scaffold it (use scripts/scaffold-selenium-bdd.mjs)
  4. Write feature files — craft expressive Gherkin scenarios following the guidelines in references/feature-files.md
  5. Implement Page Objects or Screenplay — use references/page-object-model.md for POM or references/screenplay-pattern.md for Screenplay
  6. Wire up step definitions and hooks — see references/step-definitions.md and references/hooks-and-context.md for dependency injection patterns
  7. Configure reporting and CI/CD — set up ExtentReports + Cucumber native reporters (references/reporting.md), parallel execution (references/parallel-execution.md), and GitHub Actions / Docker Grid (references/ci-cd.md)

Reference Guide

Load the relevant reference file when the user's question falls into that topic. Don't load all references at once — read only what you need.

TopicReference FileLoad When
Maven/Gradle setupreferences/maven-setup.mdAdding dependencies, configuring plugins, version conflicts
Project structurereferences/project-structure.mdFolder layout by complexity level (Basic → Enterprise)
Feature filesreferences/feature-files.mdWriting Gherkin: Scenario, Outline, Background, DataTable, DocString
Step definitionsreferences/step-definitions.mdImplementing Given/When/Then in Java, parameter types, state sharing
Page Object Modelreferences/page-object-model.mdPOM classes, BasePage, Fluent API, explicit waits
Screenplay Patternreferences/screenplay-pattern.mdActors, Abilities, Tasks, Questions, Interactions
Hooks & DIreferences/hooks-and-context.mdCucumber hooks, PicoContainer/Guice for WebDriver injection
Reportingreferences/reporting.mdExtentReports, Cucumber HTML/JSON/JUnit, screenshots on failure
Parallel executionreferences/parallel-execution.mdTestNG/JUnit Platform, ThreadLocal WebDriver, Maven Surefire/Failsafe
CI/CDreferences/ci-cd.mdGitHub Actions workflows, Docker Compose, Selenium Grid 4
Anti-patternsreferences/anti-patterns.mdCommon mistakes and how to fix them

Key Principles

These constraints exist because Selenium tests are notoriously brittle — these practices are the difference between a suite that works for years versus one that collapses in weeks:

  • Use ThreadLocal<WebDriver> for parallel execution. Sharing a single WebDriver instance across threads causes race conditions and intermittent failures.
  • Never use Thread.sleep(). Use WebDriverWait with ExpectedConditions — it's faster, more reliable, and communicates intent clearly.
  • Inject WebDriver via DI (PicoContainer or Guice). Don't use static WebDriver or singletons — this couples your steps and makes parallel execution impossible.
  • Put all locators in Page Objects, never in step definitions. When a UI changes, you fix it in one place.
  • Use By locators as constants in your Page Objects. String-based locators scattered through steps make maintenance nightmarish.
  • Assertions belong in Then steps only. Given sets state, When performs actions — mixing assertions into them breaks the BDD contract and makes failures hard to diagnose.
  • One scenario per business behavior. Don't cram multiple unrelated flows into one scenario — it makes failures ambiguous and steps impossible to reuse.
  • Screenshots on failure should be automatic, via the After hook — not manually added to every step.

Quick-Start Templates

For common requests, use the assets in assets/ as starting points:

NeedAsset
Base pom.xmlassets/pom-base/pom.xml
Sample feature fileassets/features/sample.feature
Step definitions classassets/steps/SampleSteps.java
Page Object exampleassets/pages/LoginPage.java
Cucumber runnerassets/runners/TestRunner.java
WebDriver managerassets/support/DriverManager.java
Hooks classassets/support/Hooks.java

For full project scaffolding, run:

node scripts/scaffold-selenium-bdd.mjs --level 2 --name my-project

Levels: 1 = Basic, 2 = Intermediate, 3 = Advanced, 4 = Enterprise

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.