O'Reilly logo

Selenium 2 Testing Tools Beginner's Guide by David Burns

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Finding Elements

In this chapter we are going to be looking at how we go about finding elements on the page using the WebDriver API. One of the things that we learnt in the previous chapter was that WebDriver, due to its architecture, has two major components. The first one is the "driver". This has the commands to find the elements.

We will start by having a look at the different commands. We begin with the helper commands first and then go to the more generic commands which take different types of objects. We will finish off the chapter by learning some helpful techniques when interacting with element finding.

First major learning point:

  • Finding element(s) on the page by their ID, name, ClassName, XPath, and link list
  • Tips for using ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required