Selenium/Ruby/Stack

This page explains stack from Selenium/Ruby page. This tutorial will assume that you are running tests from your machine, targeting beta cluster. Code from this page is available at mediawiki-selenium-rb repository.

Examples will:


 * open browser
 * go to main page
 * check that Log in link is present
 * close browser

The stack:

Advantages

 * Minimal stack.

Disadvantages

 * No testing framework (assertions, setup, tear-down, reporting...).

Code
Save the code in file (for example ) and run it.

Output
Everything is fine.

There is a problem.

Stack
In addition to the default stack, this example additionally uses:

Advantages

 * Nicer API on top of Selenium.

Disadvantages

 * No testing framework (assertions, setup, tear-down, reporting...).
 * Another tool to learn (Watir).

Code
Save the code in file (for example ) and run it.

Output
Everything is fine.

There is a problem.

Stack
In addition to the default stack, this example additionally uses:

Advantages

 * Very useful abstraction (page object).

Disadvantages

 * No testing framework (assertions, setup, tear-down, reporting...).
 * Another tool to learn (page-object).

Code
Save the code in file (for example ) and run it.

Output
Everything is fine.

There is a problem.

Stack
In addition to the default stack, this example additionally uses:

Advantages

 * Simple stack with assertions and testing framework (setup, tear-down, reporting...).

Disadvantages

 * Another tool to learn (testing framework).

Code
Save the code in file (for example ) and run it.

Output
Everything is fine.

There is a problem.

Stack
In addition to the default stack, this example additionally uses:

Advantages

 * Simple stack with assertions and testing framework (setup, tear-down, reporting...).

Disadvantages

 * Another tool to learn (testing framework).

Code
Save the code in files and run Cucumber.

Output
Everything is fine.

There is a problem.