Selenium Tutorial

, , …,

(this is my learning notes on Selenium)

Selenium (software) is a software to automate testing web sites. Basically, it simulates opening a web page, clicking, login, etc.

Selenium is a bit confusing. It has many different parts. Here's a summary:

What is Selenium IDE?

Selenium IDE (aka Selenium Recorder). ( is basically a recording tool (Firefox Add-On) for Firefox web browser. It lets you record clicks, etc and play it back. Good for learning Selenium, and useful for creating bug reproduction steps. This is the most basic tool, the origin of Selenium.

Selenium IDE 2014-01-29
Selenium IDE, Firefox plugin

the selenium IDE is very simple and toy-like. You can just start to use it, play with its buttons.

What is Selenese?

Selenese (Selenium IDE commands) is the commands/syntax (a small language) used in Selenium IDE. (see Selenese reference Selenium Reference) But you don't have to use it. You can use your {Python, Ruby, JavaScript, …}.

Selenium Remote Control?

Selenium Remote Control. (aka Selenium RC, Selenium 1) This is deprecated. Don't worry about this.

Selenium WebDriver?

Selenium WebDriver (Selenium 2). This basically the engine of Selenium. Available for all major browsers. The scripts in various languages calls Selenium API and talks to this WebDriver, and it in turn talks to the browser. This WebDriver was originally a different product, menat to be a standard for browser, and is in the process of becoming a w3c standard. See

Selenium Client API?

Selenium Client API. This is library for different languages to talk to Selenium WebDriver, so you can write testing scripts in {Python, Ruby, JavaScript …} to control Selenium.

thnigs to try.

click on the record (red button) to start recording. (after you click on the record button, then, go to browser, let's say, and try to login, after you login, switch back to the s ide and click stop recording.)

double click on a command runs that command.

click on the source tab to see the source code for your test.

right click on te “untitled *” under the left “Test Case” panel. You can name the test, and you can save the disk to disk. Try it.

Saving the Test

you can save the test as a standard SE xml file. Just go to File menu. the test file is basically just a HTML table.

this is the same as you click on the Source tab.

you can also save the test as a API webdrive script for Ruby, Python, etc. Just go to file menu and chose export.

try it.

you can right click on a web page to see all all the s commands.

Selenium WebDriver



download chrome driver blob at

to use chrome driver, do

import os
from import options as chrome_opt
# driver = webdriver.Firefox()
driver = webdriver.Chrome(executable_path=os.path.join(os.getcwd(), "testing2/selenium/chromedriver"))

what's HtmlUnit?

HtmlUnit is a browser without a GUI interface. It's written in Java.

HtmlUnit home page @


Selenium Reference

Official Selenium IDE tutorial @

Selenese (Selenium IDE commands) reference @ local copy: Selenium Reference

Selenium WebDriver into

Selenium WebDriver Python API

Selenium WebDriver Python API (seems a older version)

Like what you read? Buy JavaScript in Depth. Thanks.