Skip to main content

Oct 8, 2013 - 4 minute read - Courses Selenium Simplified Blog

Supporting notes and handouts for our Getting Started Online Course

This post supports our free online Get Started With Selenium WebDriver Using Maven, IntelliJ and Java Course

These notes are not ‘instead of’ working through the course. They are a supporting handout with the main links used in the course. But might help someone as a stand alone set of notes.

A cheat sheet, in other words.

Microsoft Virtual PC Compatibility Images

This should be your first stop

For older machines using Virtual PC


Install Browser and Plugins


Optionally Install Utility Tools

You do not need these, but I use them in the videos to make it easier to see what is going on.

Install Java SDK

Install Maven

Maven -

The instructions on the official maven home page work for XP and 2000 but not for Windows 7

The video is correct and there is a summary of the steps I took here

Install IntelliJ


Optionally Install Ant and Eclipse

Only if you are using these in your environment. I cover Maven and IntelliJ

Ant the easy way


A simple project using Maven

Selenium maven info

Junit maven info

Running your maven tests

The next few sections cover running your tests through maven.

Running your maven tests from the command line

in windows explorer shift+right click

mvn test

For more info on maven see

The IDEs have plugins for this too…

Running maven from IntelliJ

use maven plugin on right

Running maven from Eclipse

I would have loved to create an easy this is how to run it from Eclipse, but I found it hard to figure out how to configure eclipse to do it. Partly why I use IntelliJ with Maven. (The video on the course shows how I did it)

It should be as simple as right click on pom.xml “Run As…”

But I had config issues. Other people have encountered it too.

Having said that… I tend to use maven from the command line when working with Eclipse. And use the IDE for creating and running single tests.

Making command line easier

You can use a variety of tools to make command line work easier.

Use of Console2

Create a folder for your code and cmd.exe open at folder. Simple.



Consider ConEmu

ConEmu is a little more complicated (a lot) but much more powerful, if you have the time then investigating ConEmu may pay dividends. I’m still learning it.


For ant we need to download the webdriver Jar and create a build.xml file

WebDriver & Selenium

A simple project with Eclipse using Ant

  • Download selenium server standalone jar (
  • Create directory libs
  • Create directory for selenium_2.25.0
  • Download junit jar (junit-4.10.jar)
  • Add to project
  • create ant file
<?xml version="1.0"?>
<project name="Run Selenium Tests" default="run_all">

<!-- Sets variables which can later be used. -->
 <!-- The value of a property is accessed via ${} -->
 <property name="src" location="src" />
<property name="target" location="target" />
 <property name="libs" location="libs" />
 <property name="testresults" location="junit-results" />
 <property name="testreport" location="junit-report" />
<!-- default Selenium version to use by build script, override from command line
 e.g. ant -f buildfile.xml -DseleniumVersion=2.1.0 
 double check and adjust if necessary for each new version of Selenium
 <property name="seleniumVersion" value="2.25.0" />
 <!-- use a regular naming convention for the folder to make things easy
 so all selenium versions go in lib/selenium_<versionnumber> 
 <property name="seleniumLibsFolder" value="selenium_${seleniumVersion}" />
 <property name="seleniumclient" location="${libs}/${seleniumLibsFolder}/selenium-java-client-driver.jar" /> 
 <property name="seleniumserver" location="${libs}/${seleniumLibsFolder}/selenium-server-standalone-${seleniumVersion}.jar"/>
 <!-- Define the classpath which includes the junit.jar and the classes after compiling-->
 <path id="junit.class.path">
 <pathelement location="${libs}/junit-4.10.jar" />
 <pathelement location="${seleniumclient}" />
 <pathelement location="${seleniumserver}" />
 <pathelement location="${build}" />
<!-- Deletes the existing build and result directories-->
 <target name="clean">
 <delete dir="${build}" />
 <delete dir="${testresults}" />
 <delete dir="${testreport}" />
 <!-- Creates the build, and test results directories-->
 <target name="makedir">
 <mkdir dir="${build}" />
 <mkdir dir="${testresults}" />
 <mkdir dir="${testreport}" />
<!-- Compiles the java code -->
<target name="compile" depends="clean, makedir">
 <javac srcdir="${src}" destdir="${build}" debug="true" includeAntRuntime="false">
 <classpath refid="junit.class.path" />
 <target name="report-junit">
 <junitreport todir="${testreport}">
 <fileset dir="${testresults}">
 <include name="TEST-*.xml"/>
 <report format="frames" todir="${testreport}"/>
 <target name="run_all" depends="compile">
 <junit printsummary="yes" fork="yes" errorproperty="junit.error" failureproperty="junit.error">
 <classpath refid="junit.class.path" />
 <formatter type="xml" />
 <!-- run everything in the com.eviltester.webdriver package -->
 <batchtest todir="${testresults}">
 <fileset dir="${build}" includes="com/eviltester/webdriver/*.class" />
 <antcall target="report-junit"/>
 <fail if="junit.error" message="Selenium test(s) failed. See reports!"/>

You will need a Github account to comment. Or you can contact me with your comment.

I reserve the right to delete spam comments e.g. if your comment adds no value and its purpose is simply to create a backlink to another site offering training, or courses, etc.