The Selenium Guidebook Linux Setup Instructions

How To Install Java and Maven

  1. Install the Java 8 Development Kit (a.k.a. JDK) for your operating system (link). For detailed instructions on compiling from source, go here
  2. Install Maven using your Linux distribution’s package manager. For Debian based systems (e.g., Ubuntu) read this and for RedHat read this
  3. 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
  4. 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