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 learnt a lot in this chapter about locators. We were able to use a large number of different methods to find the elements that are on a page. We saw how to find elements using easy methods such as id=, name= to find elements and running queries against the DOM to find them using CSS selectors or XPath queries.

Specifically, we covered the following topics:

  • Using Firebug to find element attributes: In this section, we were able to start using Firebug. This will become an invaluable tool for anyone who works with web applications. It has a very good mechanism for finding elements so that you can work against them.

  • Finding an element by ID: Elements can easily be found by the value of the ID attribute. This is the most common way to find elements and is the fastest way to find the elements on the page.

  • Finding an element by name: When elements do not have IDs but do have a name attribute, your tests can use them.

  • Finding an element by DOM query: In this section, we were able to use...