Protractor and DOM
In this section, you will learn about interacting with DOM elements in the page using Protractor.
Protractor API supports and exposes classes and methods for targeting element(s) in the page. We need to mention explicitly whether we need to target a specific element or if we are expecting a group of elements to be returned.
The element function is used to find HTML elements on your webpage. It returns an ElementFinder object, which can be used to interact with the element or get information about the properties and methods attached to it.
We will need to find, edit, remove, and add elements and their properties in the page dynamically. However, to implement these use cases, we need to first define and find the target elements. ...
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