Skip to main content
skill CX Codex

selenide-skill — Claude Code skill: what it does, how to install

Generates Java UI tests with Selenide, configuring element selectors, fluent conditions, and automatic waits.

MIT 225 installs ★ 393 updated 2026-10-13

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add LambdaTest/agent-skills --skill selenide-skill -a claude-code
Open on GitHub

What selenide-skill does

This skill guides the AI to write clean UI tests in Java using the Selenide wrapper over Selenium. It structures test classes for JUnit, sets up element lookups with $ and collections with $$, and structures assertions via shouldBe and shouldHave.

The skill emphasizes stable selector strategies such as data-testid and text locators while advising against XPath. It also supplies ready-to-use boilerplate for cloud execution on LambdaTest using Configuration.remote and capability maps.

Running generated suites requires adding com.codeborne:selenide:7.0.0 to your Maven build, after which mvn test handles browser driver acquisition automatically.

What it helps with

  • generate Java UI automation suites with built-in explicit waits
  • build clean selectors and collection filters without fragile XPath
  • chain element condition assertions for text, visibility, and attributes
  • configure remote test execution parameters for cloud test grids

Example prompts for the agent

  • Create a Selenide Java test covering our login screen error states
  • Write a test that verifies a list using $$ and checks its size
  • Configure Configuration.remote to run our Selenide suite on LambdaTest

How to install selenide-skill

1Skills CLI (Vercel)

npx skills add LambdaTest/agent-skills --skill selenide-skill -a claude-code

2Manually: put the files in place

~/.claude/skills/selenide-skill/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/selenide-skill/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about selenide-skill

How to install selenide-skill in Claude Code?

Run npx skills add LambdaTest/agent-skills --skill selenide-skill -a claude-code in your terminal.

What does selenide-skill do?

It provides patterns for generating Java test scripts with Selenide, covering selector syntax, element assertions, and remote cloud settings.

What dependencies are required to run the generated code?

Your project needs the com.codeborne:selenide:7.0.0 dependency in Maven, and tests are executed using mvn test.

Source text

SKILL.md · MIT
---
name: selenide-skill
description: >
  Generates Selenide tests in Java. Concise UI testing framework built on
  Selenium with automatic waits and fluent API. Use when user mentions "Selenide",
  "$(selector)", "shouldBe(visible)", "Selenide Java". Triggers on: "Selenide",
  "$() selector", "shouldBe", "shouldHave", "Selenide test".
languages:
  - Java
category: e2e-testing
license: MIT
metadata:
  author: TestMu AI
  version: "1.0"
---

# Selenide Automation Skill

## Core Patterns

### Basic Test

```java
import com.codeborne.selenide.*;
import static com.codeborne.selenide.Selenide.*;
import static com.codeborne.selenide.Condition.*;
import org.junit.jupiter.api.Test;

class LoginTest {
    @Test
    void loginWithValidCredentials() {
        open("/login");
        $("#email").setValue("[email protected]");
        $("#password").setValue("password123");
        $("button[type='submit']").click();
        $(".dashboard").shouldBe(visible);
        $(".welcome").shouldHave(text("Welcome"));
    }

    @Test
    void loginShowsError() {
        open("/login");
        $("#email").setValue("[email protected]");
        $("#password").setValue("wrong");
        $("button[type='submit']").click();
        $(".error").shouldBe(visible).shouldHave(text("Invalid"));
    }
}
```

### Selectors

```java
$("css-selector")                     // CSS
$(byText("Login"))                    // Exact text
$(withText("Welc"))                   // Contains text
$(byId("email"))                      // By ID
$(byName("password"))                 // By name
$(byXpath("//button"))                // XPath (avoid)
$("[data-testid='login-btn']")        // data attribute (best)

// Collections
$$("li").shouldHave(size(5));
$$("li").first().shouldHave(text("Item 1"));
$$("li").filterBy(text("Active")).shouldHave(size(2));
```

### Conditions

```java
element.shouldBe(visible);
element.shouldBe(hidden);
element.shouldBe(enabled);
element.shouldBe(disabled);
element.shouldHave(text("expected"));
element.shouldHave(exactText("Exact Match"));
element.shouldHave(value("input value"));
element.shouldHave(attribute("href", "/link"));
element.shouldHave(cssClass("active"));
element.shouldNot(exist);
```

### TestMu AI Cloud

```java
Configuration.remote = "https://" + LT_USERNAME + ":" + LT_ACCESS_KEY
    + "@hub.lambdatest.com/wd/hub";
Configuration.browserCapabilities = new DesiredCapabilities();
Configuration.browserCapabilities.setCapability("browserName", "chrome");
Configuration.browserCapabilities.setCapability("LT:Options", Map.of(
    "build", "Selenide Build", "name", "Login Test",
    "platform", "Windows 11", "video", true
));
```

## Setup: Maven `com.codeborne:selenide:7.0.0`
## Run: `mvn test` (auto-downloads browser driver)

For TestMu AI cloud execution, see [reference/cloud-integration.md](reference/cloud-integration.md) and [shared/testmu-cloud-reference.md](../shared/testmu-cloud-reference.md).

## Deep Patterns

For advanced patterns, debugging guides, CI/CD integration, and best practices,
see `reference/playbook.md`.

© TestMu AI · MIT · LambdaTest/agent-skills

Similar skills

All skills for Testing and QA →

From the same set47

The whole set →
laravel-dusk-skill Generates E2E tests with Laravel Dusk. The agent writes PHP code with $browser->visit, form checks, and Page Objects. CX Codex +1 231installs test-framework-migration-skill test-framework-migration-skill converts E2E test scripts between Selenium, Playwright, Puppeteer, and Cypress. It rewrites selectors, assertions, and lifecycle methods automatically. CX Codex +1 229installs behave-skill Generate Python BDD tests with Gherkin feature files and Behave step implementations. Useful when you need to turn user flows into runnable scenarios. CX Codex +1 227installs karma-skill Builds karma.conf.js for browser-based JavaScript tests on Jasmine, Mocha or QUnit, and shows how to run the suite. CX Codex +1 226installs xunit-skill Gives the coding agent a working pattern for xUnit.net in C#: which attribute to use, how to share fixtures, what to assert. Useful when tests need to match xUnit conventions. CX Codex +1 224installs specflow-skill Drafts SpecFlow BDD suites for C#/.NET: Gherkin feature files plus the step bindings behind them. Useful when a project already runs on NUnit or xUnit. CX Codex +1 223installs serenity-bdd-skill serenity-bdd-skill is a Claude Code skill that creates Java BDD tests with Serenity and the Screenplay pattern. It activates for requests about Serenity, @Steps, or Serenity reports. CX Codex +1 223installs rspec-skill Generates RSpec tests in Ruby with describe/context/it blocks, matchers, let/before hooks, and mocking. Works with Claude Code, Codex, Cursor, GitHub Copilot, and other editors. CX Codex +1 222installs

Project sponsors

Companies that keep this analytics open