Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsTo run Selenium tests with Selenide, add the Selenide test dependency to a Java Maven project, write a test using Selenide’s browser and assertion APIs, then run it from IntelliJ IDEA or with Maven’s test lifecycle. Selenide is a Java UI-testing framework built on Selenium WebDriver 4.0 and later. The steps below start with a local test and show how to run it on Selenium Grid.
1. Create or open a Java Maven project
Use a Java project with a configured JDK and Maven. In IntelliJ IDEA, JetBrains’ Selenium project wizard lets you select Maven, choose a test framework, and select or add a JDK. The exact wizard labels can vary by IntelliJ IDEA version; the essential requirement is that the project uses a JDK and Maven.
As an Amazon Associate I earn from qualifying purchases.
Selenide can be used with JUnit, TestNG, Cucumber, ScalaTest, and JBehave. The example in this guide uses a JUnit-style @Test method. Make sure the test framework and its Maven dependencies match the test engine your project uses. The Selenide quick start’s dependency below is the framework dependency, not a complete setup for every test engine.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →2. Add Selenide to Maven
Add this dependency inside the project’s <dependencies> element in pom.xml:
#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 shown on Selenide’s official quick-start page when this article was prepared; releases change, so check the current Selenide quick start before pinning a version. The test scope keeps Selenide out of the application’s runtime dependency set.
After editing the POM, reload Maven in IntelliJ so it resolves the dependency. If you do not already have a test framework configured, add the dependency and runner configuration appropriate for the framework selected for your project; do not assume adding Selenide alone configures every framework.
3. Write a first Selenide test
This example follows Selenide’s quick-start pattern. Replace the page URL, field names, selectors, and expected text with values from your own application:
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;
public class LoginTest {
@Test
public void userCanLoginByUsername() {
open("/login");
$(By.name("user.name")).setValue("johny");
$("#submit").click();
$(".loading_progress").should(disappear);
$("#username").shouldHave(text("Hello, Johny!"));
}
}
The imports show a JUnit Jupiter test. Ensure the project has the matching JUnit engine and Maven test-runner setup if it does not already. The Selenide quick-start sample illustrates the Selenide calls and assertions; use the test framework configured in your own project.
What the Selenide calls do
open("/login")opens a page. A relative path assumes a base URL is configured; otherwise use the full application URL.$(By.name("user.name"))finds an element using a Selenium locator. Selenide also accepts CSS selectors such as$("#submit").setValueenters text, andclickactivates the selected element.should(disappear)andshouldHave(text(...))assert browser state with Selenide conditions. These condition checks wait for the stated condition rather than relying on a fixed sleep in this example.
Prefer condition-based assertions for asynchronous page behavior: assert the state that matters, such as an element appearing, disappearing, or containing expected text. A fixed delay can be too short on a slow run and unnecessarily long on a fast one.
4. Run the test in IntelliJ IDEA or Maven
Run and debug from IntelliJ IDEA
- Open the test class in the editor.
- Click the gutter Run icon beside the test class or method and select the run action.
- Read the test outcome and output in the Run/Test Runner window. Use the gutter’s debug action to debug the test.
Basic test running and debugging work without JetBrains’ Test Automation plugin. JetBrains says most of its additional Selenium support features rely on that plugin; the IDE runner itself is not the same thing as Maven’s command-line test lifecycle.
Rank #3
Run the Maven test lifecycle
From the project directory, run:
mvn test
In IntelliJ, the equivalent Maven tool-window path is Maven > Lifecycle > test. IntelliJ can also delegate test execution to Maven, which is useful when you want IDE feedback while using the project’s Maven configuration.
Run one test with Maven
To target a single test class, use the Maven test selector with the class name:
mvn -Dtest=LoginTest test
The documented selector form is -Dtest=TestName test. If the command reports no matching tests, check that the class name matches and that the selected test framework is wired into Maven.
Rank #4
5. Choose local browser or Selenium Grid
A local browser is the simpler starting point: run the test on a machine with the browser and driver setup required by your environment. When tests need to execute against a shared or remote browser environment, Selenide’s FAQ documents remote WebDriver configuration through the selenide.remote property.
For example, pass the Grid endpoint as a JVM system property:
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutemvn -Dselenide.remote=https://your.grid.com:5678/wd/hub test
Replace the example host and port with the endpoint supplied by your Grid provider. Selenide notes that most functions work with remote execution out of the box, but some features may require an integration dependency. Its FAQ specifically identifies file downloads as a case that may need com.codeborne:selenide-grid; do not assume every local-browser feature works remotely without additional setup.
Best Value
Selenide also says tests can run on CI and points to Maven, Gradle, and Ant examples. A complete CI configuration depends on the CI system, browser environment, and test framework, so the local Maven command is the portable starting point rather than a full CI recipe.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.6. Troubleshoot common setup failures
- Maven cannot resolve Selenide: confirm the dependency is inside
<dependencies>, check the coordinates and version, then reload the Maven project. If the version is unavailable or stale, verify the current version on the official quick-start page. - IntelliJ does not offer a run action beside the test: confirm the file is in the test source tree and that the test framework dependency is present and recognized. Reload Maven and check the project SDK/JDK configuration.
mvn testfinishes without running the test: verify the test class follows the naming conventions recognized by the Maven test runner, the test method uses the chosen framework’s annotation, and the framework engine is configured. To narrow the run, trymvn -Dtest=LoginTest test.- The test cannot find the page: check whether
openuses a configured base URL. If not, pass a complete URL instead of a relative path, and confirm the application is reachable from the machine running the browser. - An element assertion times out: verify the selector against the rendered page and check that the expected state is actually reached. For remote runs, also confirm the Grid endpoint and browser session are available.
- A remote-only feature fails: check whether the feature requires the
com.codeborne:selenide-gridintegration dependency; Selenide specifically notes file downloads as an example.
Or skip the browser setup
If your goal is a screenshot rather than an interactive Selenium test, ScreenshotNeo provides a website screenshot API and MCP server. A single GET request can return PNG, JPEG, WebP, or PDF output. For example, using cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. Cookie banners and consent overlays, newsletter popups, and chat widgets are handled before capture and can be disabled individually. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed; response headers identify the page verdict and billing status. An MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Sources and version notes
- Selenide quick start for the dependency and first-test patterns.
- JetBrains IntelliJ IDEA Selenium documentation for IDE setup and plugin qualifications.
- JetBrains Maven support documentation for running Maven lifecycle goals in IntelliJ.
- Selenide FAQ for remote execution and CI notes.
Frequently Asked Questions
Can I use Selenide with TestNG instead of JUnit?
Yes. Selenide lists TestNG among the supported test-framework choices; configure the matching TestNG dependency and Maven runner for your project.
Does Selenide require the IntelliJ Test Automation plugin?
No. Basic run and debug actions work without it; JetBrains says most of the additional Selenium support features rely on the plugin.
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.




