Locate an element by one class name
Automation taskEasyAsked in: Accenture, Capgemini, TCS, Wipro
A follow-up trap: "Can the class name locator take two classes separated by a space?" It cannot; it takes exactly one class. For an element with two classes, write a CSS selector such as .btn.primary. Here you find a field by its class name and print its id.