# Scripting Web Tests

with Watir and Ruby

Workbook / Labs / 2. The Watir Console

## Lab 2: Using the Watir Console to Drive Depot

You have seen a demonstration of how to drive the Depot application using the Watir Console. Now it is your turn. Enter commands into the Watir Console to drive Depot.

Use the Watir Cheat Sheet, the Watir Elements Reference, and the IE Dom Explorer as references.

1. Go to the depot home page
2. Add a book to your cart
3. Go to checkout
4. Enter personal details
5. Complete checkout

### Completion

When you have completed this lab, you should be able to:

- Use the Watir Console to:
  - Start a browser
  - Select an element by id, name, text or href
  - Enter text in a text field
  - Click a button or link
  - Select an item from a drop-down list
- Identify the attributes of page elements using the IE DOM Explorer

You can compare the commands you used to a sample solution for this lab