Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone this wiki locally
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.
Last download version supports:
- OTP R14
- Selenium server 2.1.0 (provided in the package)
- Download the archive file.
- Unzip it
- Enter in the directory
- Compile the project with
rake(Please ensure to update the file erlang_config.rb.)
- rake start_server
- rake tests
- 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 = "http://charpi.net", Command = open, selenium: cmd (Session, Command, [Start_url]), selenium: stop (Session).
test () -> Session = selenium :start (?HOST,?PORT, ?BROWSER, ?URL), Start_url = "http://charpi.net", selenium_api: open (Session, Start_url), selenium: stop (Session).
test () -> Session = selenium :launch_session (?HOST,?PORT, ?BROWSER, ?URL), Start_url = "http://charpi.net", Session: open (Start_url), Session: stop_session ().