Why Selenide
Selenium gives you a browser.
Selenide gives you tests.
Selenium WebDriver is a superb engine for driving browsers, but it was never meant to be a testing tool. Selenide turns it into one: waiting, assertions, reports and browser setup are built in, so your tests contain nothing but intent.
Selenium vs Selenide
The same test. A third of the code. None of the flakiness.
Plain Selenium WebDriver
WebDriver driver = new ChromeDriver();
try {
driver.get("https://example.com/login");
driver.findElement(By.id("username")).sendKeys("johny");
driver.findElement(By.id("password"))
.sendKeys("secret", Keys.ENTER);
WebDriverWait wait =
new WebDriverWait(driver, Duration.ofSeconds(4));
WebElement welcome = wait.until(
ExpectedConditions.visibilityOfElementLocated(
By.cssSelector(".welcome")));
// Flaky: the text may arrive after the element appears
assertEquals("Hello, Johny!", welcome.getText());
}
finally {
driver.quit();
}
Selenide
open("https://example.com/login");
$("#username").setValue("johny");
$("#password").setValue("secret").pressEnter();
$(".welcome").shouldHave(text("Hello, Johny!"));
- No driver lifecycle: the browser opens on first use and closes by itself.
- No explicit waits:
shouldHaveretries until the text is there. - No silent failures: if it never appears, you get a screenshot and a precise error.
Writing tests
An API small enough to remember and expressive enough to never fight.
Smart waiting, everywhere
Every should* check waits until the condition holds, 4 seconds by default and configurable. Actions like click() and setValue() wait for the element too. Dynamic pages, animations and slow backends stop being your problem.
$("#spinner").should(disappear);
$("#topic").shouldBe(visible, enabled);
$("h1").shouldHave(text("Order confirmed"));
$(".error").shouldNotHave(cssClass("active"));
Selectors that match how people see the page
CSS and XPath when you need them. Text, labels, ancestors and shadow DOM when you'd rather describe what the user sees.
$(byText("Sign in")).click();
$(byLabel("Email")).setValue("john@example.com");
$(withText("Total:")).shouldHave(text("$42"));
$("td.price").ancestor("tr").shouldHave(cssClass("paid"));
$(shadowCss("button", "#app-shell")).click();
Collections without loops
Check, filter and search lists of elements in one readable line. Just like single elements, every collection check waits.
$$(".todo").shouldHave(size(3));
$$(".todo").shouldHave(texts("Buy milk", "Walk the dog", "Ship it"));
$$("tr.order").filterBy(text("Paid")).shouldHave(size(2));
$$("tr.order").findBy(text("#1042")).find(".cancel").click();
Page objects without ceremony
Plain classes with plain fields. Elements are lazy, so they're looked up only when used. No PageFactory, no annotations, no driver passed around.
class LoginPage {
SelenideElement username = $("#username");
SelenideElement password = $("#password");
void loginAs(String user, String pass) {
username.setValue(user);
password.setValue(pass).pressEnter();
}
}
Debugging
When a test fails, you know why before you open the IDE.
Error messages that tell the whole story
What was expected, what was actually there, which element it was, and how long Selenide waited, plus links to the screenshot and page source taken at the moment of failure.
Element should have text "Hello, Johny!" {.welcome}
Element: '<div class="welcome">Hello, guest</div>'
Actual value: text="Hello, guest"
Screenshot: file:/build/reports/tests/1764424212345.0.png
Page source: file:/build/reports/tests/1764424212345.0.html
Timeout: 4 s.Screenshots & page source
Taken automatically on every failure. In Chromium browsers you can save the whole page as MHTML, with styles and images.
Video recording
Annotate a test with @Video and get a recording of it. By default it's kept only when the test fails.
Soft asserts
Collect every failed check in a test and see them all at once, instead of fixing them one run at a time.
Readable reports
A built-in text report of every step, plus first-class integration with Allure.
Beyond the browser
The same API for mobile, network, files and clouds.
Mobile apps
Android and iOS through selenide-appium: the same $, the same waits.
$(AppiumBy.accessibilityId("Login")).click();
$(AppiumBy.id("welcome")).shouldHave(text("Hi!"));
Network mocks
The built-in proxy intercepts requests, mocks responses and listens to WebSockets.
getSelenideProxy().responseMocker().mockText("prices",
urlContains(GET, "/api/prices"), () -> "[]");
File downloads
One call returns the downloaded file. It works headless, in Docker and on remote browsers.
File report = $("#export").download();
assertThat(report).hasExtension("pdf");
Clouds & grids
Selenium Grid, Selenoid, BrowserStack, TestMu AI and others. Switching is one setting.
Configuration.remote = "https://grid.example.com/wd/hub";
// or -Dselenide.remote=https://...
Kotlin
Full Selenide API, idiomatic Kotlin. element() is an alias of $().
element("#username").setValue("johny")
elements(".todo").shouldHave(size(3))
Any test runner
JUnit, TestNG, Cucumber, Spock. Run it from your IDE, Maven, Gradle or CI. Nothing in your build changes.
<artifactId>selenide</artifactId>
<scope>test</scope>
AI & agents
And yes, your AI agent can do all of the above.
Selenide MCP and Selenide CLI let Claude Code, Copilot, Cursor, Codex or Gemini drive a real browser and write the Selenide tests for you.
Fair questions
Before you switch.
Is Selenide a replacement for Selenium?
No, it's built on top of it. Selenide uses Selenium WebDriver under the hood and stays up to date with every Selenium release. You keep the whole Selenium ecosystem: browsers, grids, clouds and drivers.
Can I still use the raw WebDriver when I need it?
Any time. getWebDriver() hands you the underlying driver, and you can mix plain Selenium calls with Selenide in the same test.
Do I have to rewrite my existing tests?
No. Add the dependency and write new tests in Selenide next to the old ones. Many teams migrate gradually, one page object at a time.
What do I need to run it?
Java 17 or newer and a browser. Selenide works with Chrome, Firefox, Edge and Safari, locally or remotely.
Is it really free?
Yes. MIT license, no paid tier, no strings attached. Selenide has been developed in the open since 2011 and is supported by its sponsors.
Convinced? Prove it to yourself in five minutes.
One dependency, one test, one green bar.