Book Image

Learning Selenium Testing Tools - Third Edition

Book Image

Learning Selenium Testing Tools - Third Edition

Overview of this book

Table of Contents (22 chapters)
Learning Selenium Testing Tools Third Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Summary


We learned a lot in this chapter about Selenium IDE, learning how to create your first test using the record and replay functions and we now understand some of the basic concepts such as moving between multiple windows that can appear in a test, and saving our tests for future use.

Specifically, we covered the following topics:

  • How to install Selenium IDE: We started by downloading Selenium IDE from http://seleniumhq.org.

  • What Selenium IDE is made up of: The breakup of Selenium IDE allowed us to see what makes up Selenium IDE. It allowed us to understand the different parts that make up a command that will be executed in a test as well as its basic format. We had a look at how to load Selenium IDE and how to get started with recording tests. We saw that a Selenium IDE command is made up of three sections: the command, the target, and the value that might be used.

  • Recording and replaying tests: We used Selenium IDE to record a workflow that a user will need in their tests. We also had a look at verifying and asserting that elements are on the page and that the text we are expecting is also on the page.

  • How to add comments to tests: In this section of the chapter, we saw how to add comments to the tests so that they are more maintainable.

  • Working with multiple windows: In this section, we saw how applications today can have pop-up windows that tests need to be able to move between.

  • Working with AJAX applications: AJAX applications do not have the items needed for the tests when the tests get to commands. To get around this, we had a look at adding waitFor commands to the tests. This is due to the fact that Selenium does not implicitly wait for elements to appear on the page.

  • Storing information in variables: There is always something that is on the page that needs to be used later, but unfortunately, you will not know what the value is before the test runs. This section showed us how we can record items into a variable and use it later in a test. This can be something that has happened on a page and needs to be checked that it is still there on later pages.

  • Debugging tests: Creating tests does not always go according to the plan, so in this section, we saw some of the different ways to debug your tests.

  • Parameterization: Parameterizing the data in Selenium IDE.

  • Saving test suites: Finally, we saw how we can save tests for future use and how we can save them into different groups by saving them into test suites.

We also discussed what cannot be tested using Selenium IDE. We saw that Silverlight and Flex/Flash applications cannot be tested, and that when working with a number of HTML5 elements, the tests say that they have completed the tasks even though the UI has not changed. In later chapters, we will discuss different mechanisms that we can use within our tests that might be useful against HTML5 elements on the page.

Now that we've learnt about Selenium IDE, we're ready to look at all the different techniques we can use to find elements on the page.