Introduction
Up to this point, we have discussed page object classes in relation to how they fit into the framework and follow a certain model. However, there has to be a way to define the objects on the page so we can test them. We will do this by inspecting the DOM or mobile elements as they appear on a page.
Selenium uses a concept known as locators to define each element on a page. Locators are stored in each base and subclass, and define the element using one of the required DOM attributes, such as ID, class, name, tag, link text, CSS, XPath, and many more.
In this chapter, we will introduce the user to the use of inspectors for browsing page elements for both browser and mobile apps, some of the third-party tools available to test locators, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access