1

Below are the import statements.

import org.apache.commons.lang3.StringUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.StaleElementReferenceException;
import org.openqa.selenium.TimeoutException;
import org.openqa.selenium.WebDriver;

Below are the dependencies added.

<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-java</artifactId>
    <version>3.12.0</version>
</dependency>
<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-server</artifactId>
    <version>3.12.0</version>
</dependency>

Maven has successfully downloaded all the Selenium jars. Still the import statements show 'Cannot resolve symbol apache' and 'Cannot resolve symbol openqa' errors.

1 Answers1

1

Download the jar files here: https://www.selenium.dev/downloads/

Then add them in intellij via File -> Project Structure -> Modules.

Click the Dependencies Tab.

Click the plus +.

Add all the extracted jars from the zip you downloaded including those inside and outside the lib folder.

Select them all and Apply.

enter image description here

ThomasAFink
  • 1,257
  • 14
  • 25