Book Image

Selenium 1.0 Testing Tools: Beginner's Guide

By : David Burns
Book Image

Selenium 1.0 Testing Tools: Beginner's Guide

By: David Burns

Overview of this book

<p>Selenium is a suite of tools to automate web application testing across many platforms. A strong understanding of using Selenium will get you developing tests to ensure the quality of your applications.</p> <p>This book helps you understand and use Selenium to create tests and make sure that what your user expects to do can be done. It will guide you to successfully implement Selenium tests to ensure the quality of your applications.</p> <p>The Selenium Testing Tools Beginner’s guide shows developers and testers how to create automated tests using a browser. You'll be able to create tests using Selenium IDE, Selenium Remote Control and Selenium 2 as well. A chapter is completely dedicated to Selenium 2. We will then see how our tests use element locators such as css, xpath, DOM to find elements on the page.</p> <p>Once all the tests have been created we will have a look at how we can speed up the execution of our tests using Selenium Grid.</p>
Table of Contents (18 chapters)
Selenium 1.0 Testing Tools Beginner's Guide
Credits
About the Author
About the Reviewers
Preface
Index

Time for action – debugging tests


These two steps are quite useful when your tests are not running and you want to execute a specific command.

  1. Highlight a command.

  2. Press the X key: This will make the command execute in the Selenium IDE.

What just happened?

When a test is running, you can click on the Pause button to pause the test after the step that is currently being run. Once the test has been paused, the Step button is no longer disabled and you can click on it to step through the test as if you were stepping through an application.

If you are having issues with elements on the page, you can type in their location and then click on the Find button. This will surround the element that you are looking for with a green border that flashes for a few seconds.

The echo command is also a good way to write something from your test to the log. This is equivalent to Console.log in JavaScript.

Test suites

We have managed to create a number of tests using Selenium IDE and have managed to run them successfully. The next thing to have a look at is how to create a test suite. We can open the test suite and then have it run a number of tests that we have created.