selenide-skill
This skill empowers you to create Selenide test scripts in Java, streamlining UI automation workflows. Leverage AI assistance to generate robust browser testing code that integrates seamlessly with your test infrastructure and development pipeline.
Selenide-skill enables you to write Selenide tests in Java by providing guidance on the framework's fluent API and test structure. You start by importing Selenide, then use the `$()` selector to locate elements and chain conditions like `shouldBe(visible)` or `shouldHave(text(...))`. Selenide-skill helps you compose test methods that read naturally—for example, `$("#loginBtn").click()` followed by assertions—eliminating boilerplate code and reducing test maintenance overhead compared to raw Selenium.
AI-generated summary based on this skill's SKILL.md
Install
LambdaTest/agent-skills/selenide-skill · repository language: Python
git clone https://github.com/LambdaTest/agent-skills
cp -r agent-skills/selenide-skill ~/.claude/skills/selenide-skillFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do you write Selenide tests in Java?
Selenide-skill enables you to write Selenide tests in Java by providing guidance on the framework's fluent API and test structure. You start by importing Selenide, then use the `$()` selector to locate elements and chain conditions like `shouldBe(visible)` or `shouldHave(text(...))`. Selenide-skill helps you compose test methods that read naturally—for example, `$("#loginBtn").click()` followed by assertions—eliminating boilerplate code and reducing test maintenance overhead compared to raw Selenium.
What are Selenide's automatic waits and how do they differ from Selenium?
Selenide-skill explains that Selenide's automatic waits are a key advantage over Selenium: rather than manually coding explicit waits, Selenide automatically retries element lookups and condition checks for up to 4 seconds by default. This means when you write `$("#element").shouldBe(visible)`, Selenide-skill shows you how Selenide waits intelligently for that element to appear, reducing flaky tests. Unlike Selenium, which requires you to write verbose `WebDriverWait` code, Selenide-skill demonstrates how Selenide's built-in retry logic makes your tests more stable and readable.
How does Selenide's $() selector syntax work and what conditions can you use?
Selenide-skill teaches that the `$()` selector is the core of Selenide element location: you pass a CSS selector string like `$("button.submit")` or `$("#email")` to find elements. Once located, you chain conditions such as `shouldBe(visible)`, `shouldBe(enabled)`, `shouldHave(text("Login"))`, or `shouldHave(attribute("type", "email"))`. Selenide-skill helps you compose these fluent chains so that your test code reads like plain English—`$("form").shouldBe(visible)` then `$("input[name='password']").setValue("pass123")` then `$("#submit").click()`—making assertions and interactions both expressive and maintainable.
How do you set up Selenide with Maven and configure browser drivers?
Selenide-skill guides you through Selenide Maven setup by adding the Selenide dependency to your `pom.xml` file. Once added, Selenide-skill shows you how to configure browser drivers: you can set the browser type (Chrome, Firefox, Edge) via system properties or code—for example, `Configuration.browser = "chrome"`. Selenide-skill also covers driver management, including automatic WebDriver lifecycle handling, headless mode configuration, and integration with cloud platforms. This means you avoid manual driver downloads; Selenide handles WebDriver provisioning automatically, letting you focus on writing tests.
Can Selenide-skill help execute tests on cloud platforms like LambdaTest?
Yes, Selenide-skill supports cloud platform integration including LambdaTest. Selenide-skill helps you configure remote WebDriver capabilities by setting the remote URL and desired capabilities (browser, OS, resolution) so your tests run on LambdaTest's infrastructure. You configure the remote endpoint in Selenide, and Selenide-skill shows you how to pass authentication credentials and test metadata. This allows you to run your Selenide test suite across multiple browsers and operating systems in parallel on LambdaTest, scaling your UI automation without managing local infrastructure.
What does Selenide-skill provide for element filtering and collections assertions?
Selenide-skill demonstrates how to filter and assert on element collections using Selenide's fluent syntax. For example, you can use `$$("tr")` to select multiple elements, then filter by conditions like `$$("tr").filter(text("John"))` to narrow results. Selenide-skill shows you how to chain assertions on collections—`$$("li").shouldHave(size(5))` or `$$("li").shouldHave(texts("Item1", "Item2"))`. This capability lets you validate lists, tables, and repeated UI components concisely, making data-driven assertions and bulk element verification straightforward without writing loops or custom filtering logic.
SKILL.md
rendered from the published skill — quoted content, verbatim
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("user@test.com"); $("#password").setValue("password123"); $("button[type='submit']").click(); $(".dashboard").shouldBe(visible); $(".welcome").shouldHave(text("Welcome")); }
@Test
void loginShowsError() {
open("/login");
$("#email").setValue("wrong@test.com");
$("#password").setValue("wrong");
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 4 files
selenide-skill/SKILL.md
selenide-skill/reference/advanced-patterns.md
selenide-skill/reference/cloud-integration.md
selenide-skill/reference/playbook.md