---
description: selenium Intellij is an IDE that helps you to write better and faster code. Intellij can be used in the option to Java bean and Eclipse. In this tutorial, you will learn- What is intelliJ Pre-requisites to Int
title: How to Setup IntelliJ with Selenium WebDriver
image: https://www.guru99.com/images/how-to-setup-intellij-with-selenium-webdriver.png
---

[Skip to content](#main)

**⚡ Smart Summary**

IntelliJ IDEA runs Selenium WebDriver tests once the Java project carries the Selenium client library on its classpath, so the IDE compiles, runs and debugs browser automation code from a single window.

- 🔘 **Prerequisites:** IntelliJ IDEA, a JDK, a browser and the Selenium client library are required before setup.
- ☑️ **Installation:** The JetBrains installer covers the destination folder, launcher options and plugin defaults.
- ✅ **Classpath:** Project Structure, then Modules, then Dependencies adds the Selenium JAR files as external libraries.
- 🧪 **First test:** A Java class under /src opens the browser, submits an invalid email and checks the message.
- 🛠️ **Modern option:** Maven or Gradle resolves selenium-java automatically and removes the manual JAR download.
- ⚠️ **Selenium 4:** Selenium Manager fetches the matching browser driver, so no separate driver setup is needed.

Read More

![How to setup IntelliJ with Selenium WebDriver](https://www.guru99.com/images/how-to-setup-intellij-with-selenium-webdriver.png)

## What is IntelliJ?

IntelliJ IDEA is a Java Integrated Development Environment (IDE) built by JetBrains. It ships as an Apache 2.0 licensed Community Edition and a commercial Ultimate Edition, and provides advanced code navigation and code refactoring capabilities.

## Pre-requisites to Install IntelliJ with Selenium WebDriver

The setup needs the following pre-requisites.

- IntelliJ
- Any Web browser (preferably Mozilla Firefox)
- JDK ([Java](https://www.guru99.com/java-tutorial.html) Development Kit)
- Selenium .jar files

The required jar files can be downloaded from the [Selenium.org](https://www.selenium.dev/downloads/) official site. After download, extract the .jar files into the desired directory.

**Note:** a [Maven](https://www.guru99.com/maven-tutorial.html) or Gradle build resolves *selenium-java* automatically, making this manual download optional.

## How to Download & Install IntelliJ

**Step 1)** To download IntelliJ visit the [JetBrains site](https://www.jetbrains.com/idea/download/). Here we selected the “Community” Version; choose “Ultimate” for mobile, web and enterprise development.

[![JetBrains download page showing the IntelliJ IDEA Community and Ultimate editions]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint1.png)

**Step 2)** When you begin downloading, you will see a message like this.

[![Browser download message shown when the IntelliJ IDEA installer starts downloading]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint2.png)

**Step 3)** A pop-up window will open. Click the ‘run’ button.

[![Windows pop-up asking whether to run the downloaded IntelliJ IDEA installer]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint3.png)

**Step 4)** Click the ‘next’ button in the setup wizard.

[![IntelliJ IDEA setup wizard welcome screen with the Next button]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint4.png)

**Step 5)** Browse to your destination folder and click the ‘next’ button.

[![IntelliJ IDEA installer asking for the destination installation folder]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint5.png)

**Step 6)** On the installation options screen,

1. Mark the checkbox – 32-bit launcher
2. Mark the checkbox for language as per your requirement
3. Click the ‘next’ button

[![IntelliJ IDEA installation options screen with the 32-bit launcher and language checkboxes]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint6.png)

**Note:** current builds are 64-bit only, so the 32-bit launcher checkbox no longer appears.

**Step 7)** Click the ‘Install’ button.

[![IntelliJ IDEA installer Start Menu folder screen with the Install button]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint7.png)

You can see the IntelliJ installing process is in progress.

[![IntelliJ IDEA installation progress bar during setup]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint8.png)

**Step 8)** On the final wizard screen,

1. To run IntelliJ, mark the checkbox and
2. Click the ‘Finish’ button

[![Final IntelliJ IDEA wizard screen with the Run IntelliJ IDEA checkbox and Finish button]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint9.png)

**Step 9)** If an older IntelliJ version exists, you can import its settings. No previous version is installed here, so select the second option.

[![Import IntelliJ IDEA settings dialog offering settings from a previous version]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint10.png)

**Step 10)** After you click ‘ok’, IntelliJ asks for the JetBrains privacy policy agreement. Click ‘Accept’.

[![JetBrains privacy policy agreement dialog with the Accept button]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint11.png)

**Step 11)** Now you can set the plugin settings.

[![IntelliJ IDEA plugin customisation screen during first launch]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint12.png)

**Step 12)** Select the option you need: create a new project, import project or open.

[![IntelliJ IDEA welcome screen with Create New Project, Import Project and Open options]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint13.png)

**Step 13)** On the import screen,

1. Select the ‘Project’ and ‘file’ from the library and
2. Click the ‘OK’ button

[![IntelliJ IDEA import dialog for selecting the project and file from the library]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint14.png)

**Step 14)** The selected file now appears in the project directory.

[![IntelliJ IDEA project directory showing the imported file in the project tool window]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint15.png)

**Don't Miss:**

- [Selenium IDE Tutorial](https://www.guru99.com/introduction-selenuim-ide.html)
- [How to Handle Alerts & Popups in Selenium?](https://www.guru99.com/alert-popup-handling-selenium.html)
- [Selenium Firefox Profile: Setup Guide](https://www.guru99.com/firefox-profile-selenium-webdriver.html)
- [How to Click on Image in Selenium Webdriver](https://www.guru99.com/click-on-image-in-selenium.html)

## Configure IntelliJ to Support Selenium

To support Selenium, configure IntelliJ using the following steps.

**Step 1)** Launch your IntelliJ IDE and make a new Project. Select File -> New -> Project

[![IntelliJ IDEA File menu with New and Project selected to create a Java project]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint16.png)

**Step 2)** When you Click -> Next, a new screen opens. Name the project; here we used Selenium\_Guru99. Then Click -> Finish.

[![New project screen where the project is named Selenium\_Guru99 before clicking Finish]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint17.png)

**Step 3)** Now you need to add the Selenium .jar files into IntelliJ as external libraries.

For this go to File -> Project Structure -> in the project setting tab look for Modules -> Dependencies -> Click the ‘+’ Sign -> Select for JARs or directories.

[![Project Structure dialog with Modules and Dependencies open and the plus sign highlighted]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint18.png)

**Step 4)** Select all Selenium .jar files from the extracted directory and its /lib subdirectory.

[![File chooser used to select the Selenium jar files from the extracted lib directory]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint19.png)

The .jar files are now added. Note that the project’s /src directory is still empty.

[![Project structure showing the Selenium jars added as libraries and an empty src directory]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint20.png)

**Step 5)** Right Click on /src directory -> New -> Java Class. Your project structure will look as shown below.

[![Right-click menu on the src directory used to create a new Java Class]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint21.png)

## IntelliJ Selenium Example

Now write your [first WebDriver script](https://www.guru99.com/first-webdriver-script.html) against https://demo.guru99.com/

In this test scenario

1. We will launch the URL
2. Enter Invalid Email ID
3. Click the ‘Submit’ button
4. The output will be as shown below- ‘Email id is not valid’

[![Guru99 demo bank page returning the message Email ID is not valid after an invalid entry]()](https://www.guru99.com/images/7-2016/072216_1053_Howtouseint22.png)

In the result above, you can see that

- Running the code opens a Firefox instance.
- The code sends an email to the WebElement, an input field (abc.gmail.com).
- When [Selenium](https://www.guru99.com/selenium-tutorial.html) WebDriver clicks ‘submit’, the Guru99 site verifies the email id.
- An unregistered email shows “Email ID is not valid.”

Following is java code for test1, locating both fields by [XPath](https://www.guru99.com/xpath-selenium.html).

```
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

public class TestSelenium {											
			public static void main(String[] args){        
				FirefoxDriver driver=new FirefoxDriver();        
				driver.get("https://demo.guru99.com/");
				WebElement element=driver.findElement(By.xpath("//input[@name='emailid']"));
				element.sendKeys("abc@gmail.com");            

				WebElement button=driver.findElement(By.xpath("//input[@name='btnLogin']"));
			button.click();    
		}
}

```

**Note:** this Selenium 3 era snippet expects geckodriver on the PATH; on Selenium 4 it runs unchanged because Selenium Manager resolves the driver.

## Advantages of using IntelliJ

Beyond Selenium support, the IDE offers several productivity features worth knowing.

- It generates getter and setter methods for object attributes instantly.
- Simple keystrokes wrap a statement in a try-catch or if-else block, which speeds up [exception handling](https://www.guru99.com/exception-handling-selenium.html).
- Inbuilt packaging tools include Gradle, sbt, Grunt and Bower.
- Databases such as [SQL](https://www.guru99.com/sql.html), Oracle, PostgreSQL and Microsoft SQL Server open directly in the IDE.
- It supports Java, [JavaScript](https://www.guru99.com/interactive-javascript-tutorials.html), Clojure and other languages.
- It runs on Windows, Linux and macOS, and is downloadable from the JetBrains site.

## FAQs

🧰 Should you use Maven instead of adding Selenium JAR files manually?

Maven is preferred today. One selenium-java dependency in pom.xml pulls every jar, and an upgrade needs only a version change.

⚠️ Why does IntelliJ report cannot resolve symbol after adding the jars?

The module has no dependency entry yet. Recheck Project Structure then Dependencies, then run File then Invalidate Caches and Restart.

🧪 Do you need TestNG or JUnit to run these tests?

Not for a main method, but [JUnit](https://www.guru99.com/junit-tutorial.html) or TestNG adds annotations, assertions, setup hooks, grouping and reports.

🤖 How does AI help maintain Selenium tests written in IntelliJ?

AI powered locator healing repairs selectors that shifted after a release, and machine learning models rank flaky failures for triage.

💻 Can GitHub Copilot write Selenium page object classes inside IntelliJ?

Yes. [GitHub Copilot](https://github.com/features/copilot) drafts page objects from a comment, but verify every suggested locator against the live DOM.

🧭 Is IntelliJ IDEA better than Eclipse for Selenium work?

Both run Selenium well. IntelliJ has stronger code completion and refactoring out of the box; Eclipse is lighter and free at every tier. Team familiarity usually decides.

📦 Does Community Edition support Selenium testing fully?

Yes. It covers Java, Maven, Gradle, JUnit and TestNG. Ultimate adds web framework, database and profiling tools instead.

🔄 Why does the Firefox example fail on a current Selenium version?

Selenium 4 downloads geckodriver itself, so failures now usually mean a browser and driver version mismatch or leftover [session state](https://www.guru99.com/handling-cookies-selenium-webdriver.html).

#### Summarize this post with:

ChatGPTPerplexityGrokGoogle AI

**Stay Updated on AI** **Get Weekly AI Skills, Trends, Actionable Advice.**

##### Sign up for the newsletter

Subscribe for Free

You have successfully subscribed.  
Please check your inbox.

![AI-Newsletter]() Chosen by over **350,000+** professionals

[Scroll to top](#wrapper)

×

Search for:

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.guru99.com/#organization","name":"Guru99","sameAs":["https://www.facebook.com/Guru99Official","https://twitter.com/guru99com"],"logo":{"@type":"ImageObject","@id":"https://www.guru99.com/#logo","url":"https://www.guru99.com/images/guru99-logo-v1-150x59.png","contentUrl":"https://www.guru99.com/images/guru99-logo-v1-150x59.png","caption":"Guru99","inLanguage":"en-US"}},{"@type":"WebSite","@id":"https://www.guru99.com/#website","url":"https://www.guru99.com","name":"Guru99","publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https://www.guru99.com/images/how-to-setup-intellij-with-selenium-webdriver.png","url":"https://www.guru99.com/images/how-to-setup-intellij-with-selenium-webdriver.png","width":"700","height":"250","caption":"How to Setup IntelliJ with Selenium WebDriver","inLanguage":"en-US"},{"@type":"BreadcrumbList","@id":"https://www.guru99.com/intellij-selenium-webdriver.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":"1","item":{"@id":"https://www.guru99.com","name":"Home"}},{"@type":"ListItem","position":"2","item":{"@id":"https://www.guru99.com/selenium","name":"Selenium"}},{"@type":"ListItem","position":"3","item":{"@id":"https://www.guru99.com/intellij-selenium-webdriver.html","name":"How to Setup IntelliJ with Selenium WebDriver"}}]},{"@type":"WebPage","@id":"https://www.guru99.com/intellij-selenium-webdriver.html#webpage","url":"https://www.guru99.com/intellij-selenium-webdriver.html","name":"How to Setup IntelliJ with Selenium WebDriver","dateModified":"2026-07-30T14:09:30+05:30","isPartOf":{"@id":"https://www.guru99.com/#website"},"primaryImageOfPage":{"@id":"https://www.guru99.com/images/how-to-setup-intellij-with-selenium-webdriver.png"},"inLanguage":"en-US","breadcrumb":{"@id":"https://www.guru99.com/intellij-selenium-webdriver.html#breadcrumb"}},{"@type":"Person","@id":"https://www.guru99.com/author/admin","name":"Krishna Rungta","url":"https://www.guru99.com/author/admin","image":{"@type":"ImageObject","@id":"https://www.guru99.com/images/krishna-rungta-v2-120x120.png","url":"https://www.guru99.com/images/krishna-rungta-v2-120x120.png","caption":"Krishna Rungta","inLanguage":"en-US"},"worksFor":{"@id":"https://www.guru99.com/#organization"}},{"articleSection":"Selenium","headline":"How to Setup IntelliJ with Selenium WebDriver","description":"selenium Intellij is an IDE that helps you to write better and faster code. Intellij can be used in the option to Java bean and Eclipse. In this tutorial, you will learn- What is intelliJ Pre-requisites to Int","keywords":"selenium","speakable":{"@type":"SpeakableSpecification","cssSelector":[".entry-title",".summary"]},"@type":"Article","author":{"@id":"https://www.guru99.com/author/admin","name":"Krishna Rungta"},"dateModified":"2026-07-30T14:09:30+05:30","image":{"@id":"https://www.guru99.com/images/how-to-setup-intellij-with-selenium-webdriver.png"},"copyrightYear":"2026","name":"How to Setup IntelliJ with Selenium WebDriver","subjectOf":[{"@type":"HowTo","name":"How to Install Selenium in IntelliJ:","description":"Here is a step-by-step process on How to Install Selenium in IntelliJ:","step":[{"@type":"HowToStep","name":"Step 1) Launch IntelliJ IDE.","text":"Launch your IntelliJ IDE and make a new Project. Select File -&gt; New -&gt; Project","image":"https://www.guru99.com/images/7-2016/072216_1053_Howtouseint16.png","url":"https://www.guru99.com/intellij-selenium-webdriver.html#step1"},{"@type":"HowToStep","name":"Step 2) Set project name.","text":"In the previous step when you Click -&gt; Next. A new screen will open. In this screen, give project name. In our case, we have given name Selenium_Guru99. Then Click -&gt; Finish. Your project has been created in IntelliJ.","image":"https://www.guru99.com/images/7-2016/072216_1053_Howtouseint18.png","url":"https://www.guru99.com/intellij-selenium-webdriver.html#step2"},{"@type":"HowToStep","name":"Step 3) Now add Selenium .jar file into intelliJ as external libraries.","text":"For this Click go to File -&gt; Project Structure -&gt; in a project setting tab look for Modules -&gt; Dependencies -&gt; Click on \u2018+\u2019 Sign -&gt; Select for JARs or directories.","image":"https://www.guru99.com/images/7-2016/072216_1053_Howtouseint19.png","url":"https://www.guru99.com/intellij-selenium-webdriver.html#step3"},{"@type":"HowToStep","name":"Step 4) Select all the selenium .jar files.","text":"Select all the selenium .jar files from the directory and subdirectory /lib, where you have extracted after download.","image":"https://www.guru99.com/images/7-2016/072216_1053_Howtouseint20.png","url":"https://www.guru99.com/intellij-selenium-webdriver.html#step4"},{"@type":"HowToStep","name":"Step 5) You have successfully added the .jar files into intelliJ. Check project structure","text":"Right Click on /src directory -&gt; New -&gt; Java Class. Your project structure will look as shown below.","image":"https://www.guru99.com/images/7-2016/072216_1053_Howtouseint21.png","url":"https://www.guru99.com/intellij-selenium-webdriver.html#step5"}]},{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Should you use Maven instead of adding Selenium JAR files manually?","acceptedAnswer":{"@type":"Answer","text":"Maven is preferred today. One selenium-java dependency in pom.xml pulls every jar, and an upgrade needs only a version change."}},{"@type":"Question","name":"Why does IntelliJ report cannot resolve symbol after adding the jars?","acceptedAnswer":{"@type":"Answer","text":"The module has no dependency entry yet. Recheck Project Structure then Dependencies, then run File then Invalidate Caches and Restart."}},{"@type":"Question","name":"Do you need TestNG or JUnit to run these tests?","acceptedAnswer":{"@type":"Answer","text":"Not for a main method, but JUnit or TestNG adds annotations, assertions, setup hooks, grouping and reports."}},{"@type":"Question","name":"How does AI help maintain Selenium tests written in IntelliJ?","acceptedAnswer":{"@type":"Answer","text":"AI powered locator healing repairs selectors that shifted after a release, and machine learning models rank flaky failures for triage."}},{"@type":"Question","name":"Can GitHub Copilot write Selenium page object classes inside IntelliJ?","acceptedAnswer":{"@type":"Answer","text":"Yes. GitHub Copilot drafts page objects from a comment, but verify every suggested locator against the live DOM."}},{"@type":"Question","name":"Is IntelliJ IDEA better than Eclipse for Selenium work?","acceptedAnswer":{"@type":"Answer","text":"Both run Selenium well. IntelliJ has stronger code completion and refactoring out of the box; Eclipse is lighter and free at every tier. Team familiarity usually decides."}},{"@type":"Question","name":"Does Community Edition support Selenium testing fully?","acceptedAnswer":{"@type":"Answer","text":"Yes. It covers Java, Maven, Gradle, JUnit and TestNG. Ultimate adds web framework, database and profiling tools instead."}},{"@type":"Question","name":"Why does the Firefox example fail on a current Selenium version?","acceptedAnswer":{"@type":"Answer","text":"Selenium 4 downloads geckodriver itself, so failures now usually mean a browser and driver version mismatch or leftover session state."}}]}],"@id":"https://www.guru99.com/intellij-selenium-webdriver.html#schema-27631","isPartOf":{"@id":"https://www.guru99.com/intellij-selenium-webdriver.html#webpage"},"publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US","mainEntityOfPage":{"@id":"https://www.guru99.com/intellij-selenium-webdriver.html#webpage"}}]}
```
