The Selenium Guidebook Windows Setup Instructions

How To Install Java

  1. Install the Java 8 Development Kit (a.k.a. JDK) for your operating system (link)
  2. Add a JAVA_HOME environment variable to your system that points to where the JDK is installed (e.g., C:\Program Files\Java\jdk1.8.0_40). For a detailed explanation of how to do this, go here. This is required for Maven to work

How To Install Maven

  1. Download the latest binary zip from the Maven Downloads page
  2. Unzip and move the contents of the Maven binary zip package into a Program Files directory (e.g., C:\Program Files\apache-maven-3.2.5)
  3. Append the Maven directory to your PATH environment environment variable (e.g., ;C:\Program Files\apache-maven-3.3.3\bin). For details on how to do this, go here
  4. Open a new command-prompt and run mvn -version to confirm that it’s working. If it is, it will list the application and its version information. If it’s not working, it will display an error that should help you debug what’s wrong
  5. Download and unzip an initial Maven project directory structure (with pre-loaded dependency file) from here.

How To Setup IntelliJ

  1. Download and install IntelliJ IDEA Community Edition
  2. Launch IntelliJ and Open the Maven project directory you downloaded earlier by clicking File, Open, traverse to where you unzipped the download, select init-java-master, and click OK. Maven will load all of the requisite dependencies (e.g., JUnit and Selenium) behind the scenes
  3. Configure IntelliJ so it uses the JDK by following the SDK configuration instructions here

How To Setup Eclipse (skip if you setup IntelliJ)

  1. Download and install Eclipse IDE for Java Developers
  2. Launch Eclipse and select a workspace (click OK to accept the defaults provided)
  3. Star the project import wizard by clicking File and Open Projects from File System...
  4. Select the Maven project directory downloaded earlier (from the final Maven installation step) by clicking Directory, selecting the init-java-master directory, clicking Open, and then Finish.
  5. Open the Package Explorer by clicking Window, Show View, Package Explorer

Eclipse Troubleshooting

If you see a warning about the build path (e.g., Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment.) try the following:

  1. Right-click on the project name
  2. Click Properties
  3. Click the Java Compiler in the left-hand pane
  4. Under the JDK Compliance section in the right-hand pane, click on Compiler compliance level and select 1.8
  5. Click Apply and Close
  6. Click Yes when prompted to rebuild the project

How To Install the Browser Driver for Firefox

  1. Visit the browser driver download page for Mozilla’s geckodriver
  2. Download the latest available version of the browser driver for your operating system
  3. Unzip the file (if zipped) and place the file in a known folder on your system
  4. Optional: Add this known folder to your system path