In this chapter, you learned one of the most important features of Selenium for finding elements on web pages to simulate user actions.
We looked at various find_element_by_
methods to find an element using ID, name, class name attributes, tags names, XPath, CSS selectors, and to find links using link text and partial link text.
We implemented tests using various find_element_by
methods to understand various strategies that we can use to find elements.
This chapter will be the foundation for the coming chapters that delve into using the Selenium API for user interactions.
In the next chapter, you will learn how to use Selenium WebDriver functions to interact with various HTML elements and perform actions such as entering a value in a textbox, clicking on a button, selecting drop-down options, handling JavaScript alerts, and working with frames and windows.