charpi edited this page Jul 24, 2011 · 23 revisions

Selenium is a well known web unittest framework, it allows you to test your web site inside several browsers.
Selenium-RC is an extension which allow you to run your tests remotely and from your favorite language.

When I started to be interested by selenium, no erlang client library was avaiable.
After a quick look at the protocol between the server and the ‘library’, I don’t see any reasons that make the erlang binding impossible to write so I decided to write erl_selenium.

In order to start using erl_selenium, you can download the last source package at or visit the public git repository.

If you are using erl_selenium, I’ll be glad to have your feedback. Feel free to send a mail at


Last download version supports:

  1. OTP R14
  2. Selenium server 2.1.0 (provided in the package)


From source

  1. Download the archive file.
  2. Unzip it
  3. Enter in the directory
  4. Compile the project with rake (Please ensure to update the file erlang_config.rb.)
More information about how to build erlang with rake can be found at erl_rake To validate that the package is working as expected
  1. rake start_server
  2. rake tests
  3. rake stop_server


The package is extremely simple to use and don’t have extra dependency.
All requests are made with the standard OTP http client. If you want to use it for load testing, you might encounter some limitation due to httpc.


test () ->
    Session = selenium :start (?HOST,?PORT, ?BROWSER, ?URL),
    Start_url = "",
    Command = open,
    selenium: cmd (Session, Command, [Start_url]),
    selenium: stop (Session).

Selenium API

test () ->
    Session = selenium :start (?HOST,?PORT, ?BROWSER, ?URL),
    Start_url = "",
    selenium_api: open (Session, Start_url),
    selenium: stop (Session).

Selenium Session

test () ->
    Session = selenium :launch_session (?HOST,?PORT, ?BROWSER, ?URL),
    Start_url = "",
    Session: open (Start_url),
    Session: stop_session ().
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.