© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
S. ShuklaThe Protractor Handbookhttps://doi.org/10.1007/978-1-4842-7289-3_2

2. Selenium-Inherited Web Locators

Shashank Shukla1  
(1)
Mandla, Madhya Pradesh, India
 
Now that your framework is installed and your first test case is running successfully, let’s proceed to the next step. This chapter explains how to locate the elements of a web page so that they can be interacted with. You will also learn about different locator strategies that Protractor inherits from Selenium WebDriver (webdriver.By) library, including the following.
  • Taking a screenshot of an identified locator

  • ID, class, and name locators

  • tagName locator

  • linkText and partialLinkText locators

  • CSS and ...

Get The Protractor Handbook: Understanding and Implementing the Tool Effectively 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.