How to automate Selenium scripts

Selenium is a test tool for web applications. Selenium tests run directly in a browser. I have put together a guide to show how to take many Selenium scripts and automate them using a single test.


  • Download Firefox (i.e. Firefox Setup
  • Download Selenium IDE (Firefox plug-in) (i.e. selenium-ide-1.0-beta-1.xpi) and install by opening a Firefox window and dragging and dropping selenium-ide-1.0-beta-1.xpi onto a Firefox window.
  • Download Java Runtime Engine 1.6 (i.e. jre-6u5-windows-i586-p.exe)
  • Download Selenium Remote Control (i.e. and extract the zip file to a folder (i.e. D:\selenium-server-1.0-beta-1)

Note: This has been tested in a Windows environment; this however, is an operating system independent procedure.

Create Selenium Script(s)


  • Save the script with file extension .html (i.e. print.html)
  • Record several scripts, save each with the extension .html

Scripts folder

Automate Selenium Script(s)

  • Create an html file to batch the tests together (placed in the same folder) as the existing html tests. testsuite.html
          <td>Test suite for the whole application</td>
          <td><a href="print.html" target="testFrame">Print: Test Plugin</a></td>
          <td><a href="categories.html" target="testFrame">Categories: Navigation Tests</a></td>
          <td><a href="pages.html" target="testFrame">Pages: Navigation Tests</a></td>
    • Create a batch file to run the scripts and generate a results file, results.html
      For this example, autoRunSelenium.cmd

    java -jar "D:\selenium-server-1.0-beta-1\selenium-server.jar" -htmlSuite "*firefox" "" "D:\seleniumtests\testsuite.html" "D:\seleniumtests\results.html"


    • Run autoRunSelenium.cmd from your desktop, a command windows will open and
    • a popup screen similar to this may appear.


    • After the cmd window closes goto (D:\seleniumtests\results.html) for the results, done.