Importing Selenium Webdriver from Maven to Intellij IDEA Importing Selenium Webdriver from Maven to Intellij IDEA selenium selenium

Importing Selenium Webdriver from Maven to Intellij IDEA


I had the similar problem. You must create a java module in the maven project directory (it's already your project directory), not in a separate-directory, without creating a project directory inside the Maven, and then all the dependencies will be catch up


It looks like Maven did import the dependencies It is not clear from your screenshot if you've created a new class(Missing package,Class name, methods...)

Try in your IntelliJ:

  1. Right click on your project tree
  2. New->Java class
  3. Name it SeleniumTest (or any other name)
  4. Create a new method:
    public static void main(String[] args) { WebDriver driver = new FirefoxDriver();}
  5. Add the missing imports

Let me know if it helps or if you need more assistance


Here's what helped me. After importing the project:

  1. Create a src folder manually.
  2. Open the File — Project Structure — Modules
  3. Select your project.

    enter image description here

  4. Mark the src folder as source locationenter image description here