Chapter 4. Finding Elements
In this chapter, we will look at how to find elements on the page using the WebDriver API. One of the things that we learned in the previous chapter was that WebDriver and its architecture have a major component called driver. This has the commands to find elements.
Let's start with the different commands. We begin with the helper commands and then move on to the more generic commands, which take different types of objects. We will finish the chapter with some helpful techniques when interacting with element finding.
Two major learning points are as follows:
- Finding elements on the page by their ID, name, ClassName, XPath, and link list
- Tips to use find element calls
So let's get on with it. When working with the following ...
Get Learning Selenium Testing Tools - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.