Free tools Windows power users keep installed
One-click scans. No signup required.
To run Selenium-based UI tests with Selenide, add the Selenide test dependency to a Java Maven project, write a test using Selenide’s browser and condition APIs, then run it from IntelliJ IDEA or with mvn test. Selenide is built on Selenium WebDriver 4.0+ and handles common browser interactions and condition-based waits through a fluent Java API.
1. Create or open a Java Maven project
Use a Java project with Maven and a configured JDK. In IntelliJ IDEA, the Selenium project wizard lets you select Maven, choose a test framework, and select or add a JDK. You can also use an existing Maven project; confirm its Project SDK is set in File > Project Structure > Project.
Selenide works with JUnit, TestNG, Cucumber, ScalaTest, and JBehave. The example below uses JUnit-style @Test; ensure the project has the test engine and imports appropriate to the framework you choose. JetBrains documents its Selenium project setup at IntelliJ IDEA Selenium support.
2. Add Selenide to Maven
Add this dependency inside the project’s <dependencies> element in pom.xml:
Recommended Free Tools
#1 Best Overall
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>selenide</artifactId>
<version>7.18.2</version>
<scope>test</scope>
</dependency>
Version 7.18.2 is the version displayed in the Selenide quick start when this guide was prepared; check the official quick start for a newer release before starting a new project. The test scope keeps Selenide out of the application’s runtime dependency set.
After editing the POM, reload Maven in IntelliJ—use the Maven tool window’s reload action—or allow the IDE to import the changes. Maven must be able to resolve the dependency before the test can compile.
3. Write a first Selenide test
For a login page available at your application’s base URL, a test can use this pattern. Replace the URL, field names, selectors, and expected text with values from your application, and add the imports and test-framework dependency required by your chosen runner.
Rank #2
import static com.codeborne.selenide.Selenide.*;
import static com.codeborne.selenide.Condition.*;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.By;
class LoginTest {
@Test
void userCanLoginByUsername() {
open("/login");
$(By.name("user.name")).setValue("johny");
$("#submit").click();
$(".loading_progress").should(disappear);
$("#username").shouldHave(text("Hello, Johny!"));
}
}
The imports here use JUnit 5’s test annotation. Your project must include its JUnit test engine or the corresponding dependency and configuration for another test framework; the Selenide dependency alone does not select a test runner.
How the test works
open("/login")navigates to the application path. Configure the application’s base URL for the test environment, or pass a complete URL.$(By.name(...))and$("#submit")locate elements using a Selenium locator or a CSS selector.setValueenters text andclickactivates the button.should(disappear)andshouldHave(text(...))assert conditions. Selenide waits for the stated condition rather than requiring a fixed sleep in this example.
The page must be reachable and the selectors must match its rendered DOM. Avoid treating the example’s credentials or greeting as universal values.
4. Run the test in IntelliJ IDEA or Maven
Run from IntelliJ IDEA
- Open the test class in the editor.
- Click the gutter Run icon beside the test class or a test method and choose the run action.
- Read the outcome and any failure details in the Run/Test Runner window. Use the adjacent Debug action when you need to step through the test.
Basic test running and debugging work without JetBrains’ Test Automation plugin. JetBrains notes that “Selenium support in IntelliJ IDEA is provided by the Test Automation plugin, and most of the features described in this section rely on it.” That plugin adds Selenium-specific IDE support; it is not required simply to launch a test. See JetBrains’ Selenium documentation.
Rank #3
Run the Maven test lifecycle
From the project directory, run:
mvn test
Alternatively, open IntelliJ’s Maven tool window and select Lifecycle > test. IntelliJ can run Maven goals directly, and it can also delegate project build and run actions to Maven. Maven execution is useful when you want to run the project’s configured test lifecycle from the command line or reproduce that lifecycle independently of the IDE runner. See JetBrains Maven support and the Selenide quick start.
Run one test with Maven
To target a single test class, use the Maven Surefire test selector with the class name (without the .java suffix):
mvn -Dtest=LoginTest test
In an IntelliJ Maven run configuration, enter -Dtest=LoginTest test as the goals or command-line arguments according to the configuration field shown by your IDE version. This runs the selected test through Maven rather than the IDE’s independent runner.
Rank #4
5. Choose local or remote browser execution
Local browser
For a first run, keep execution local and use a browser supported by the WebDriver setup available to your project. The Selenide FAQ describes its use with WebDriver-bound browsers. Check your installed browser, driver and Selenide configuration if the browser cannot start; a test-framework dependency does not itself resolve every machine-specific browser setup issue.
Selenium Grid
To direct Selenide to a remote Selenium Grid, configure the remote endpoint, for example:
mvn -Dselenide.remote=https://your.grid.com:5678/wd/hub test
Replace the example host and port with the Grid endpoint accessible to your test process. Selenide’s FAQ says most functions work with remote execution out of the box, but some features—such as file downloads—need the additional com.codeborne:selenide-grid dependency. Do not assume every local-browser feature behaves remotely without checking the requirement for that feature. See the Selenide FAQ.
Best Value
6. Troubleshoot common failures
- Cannot resolve Selenide or imports are red: check that the dependency is nested under
<dependencies>, Maven is online and has reloaded the POM, and the version exists in the configured repositories. @Testis not recognized or no tests are discovered: add and configure the test framework and its engine, use its correct annotation and imports, and check that the class and method follow the runner’s discovery conventions. The Selenide artifact does not replace the test engine.- The browser does not open: confirm a compatible browser is installed and that the project’s WebDriver/browser configuration is valid. For Grid, verify the remote URL is reachable from the machine running Maven or IntelliJ.
open("/login")fails or lands on the wrong site: configure the application base URL or use a complete URL, and confirm the test environment is running and reachable.- An element lookup or condition assertion times out: verify the locator against the current page DOM, check whether the page is showing a different state, and ensure the expected text or disappearance condition is correct. Prefer an assertion for the expected condition over inserting an arbitrary fixed sleep.
- A remote-only feature fails: check whether that feature requires Grid-specific support; Selenide names file downloads as an example requiring
com.codeborne:selenide-grid. - IntelliJ’s Selenium helpers are missing: basic run/debug can still work; install or enable the Test Automation plugin only if you need the extra Selenium IDE features documented by JetBrains.
7. Run tests in CI
Selenide tests can run in continuous integration, and its FAQ points to Maven, Gradle, and Ant examples. The same Maven test lifecycle used locally can be invoked in a CI job; the job also needs a configured JDK, the chosen test framework, and a browser or reachable Grid appropriate to the environment. Grid can separate the test runner from browser execution, but the exact CI setup depends on the provider and infrastructure.
Or skip the browser setup
If the goal is to capture a page rather than verify interactive behavior, ScreenshotNeo provides a website screenshot API and MCP server. It does not replace Selenium UI tests; it is an option for generating page screenshots or PDFs without setting up a browser test locally. One GET request returns a PNG, JPEG, WebP, or PDF. See the ScreenshotNeo API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo removes cookie and consent banners, newsletter popups, and chat widgets before capture. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed; response headers indicate the page verdict and billing status. Its MCP server includes tools for AI agents to take screenshots, inspect page information, and capture PDFs. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.
Sign up for 1,000 free screenshots a month with no card.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Frequently Asked Questions
Can I use Selenide with a test framework other than JUnit?
Yes. Selenide lists TestNG, Cucumber, ScalaTest, and JBehave as options as well as JUnit; configure the framework’s own test engine and annotations.
Can I use IntelliJ’s Run button and still use Maven?
Yes. The IntelliJ gutter runner and Maven’s test lifecycle are distinct ways to launch tests, and IntelliJ also supports running Maven goals.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

