Many designers know about XPath as a locating strategy to find nodes in complex XML tree structures. Sauce Labs encourages test teams to focus on CSS (Cascading Style Sheet) for their locating needs. CSS is not only supported by all browsers, but is a technology that is well documented and understood by devs and Qe professionals. In the Selenium testing world, CSS Selectors are a fundamental tool for easy test automation.
CSS files help define font, size, color, spacing and borders of the HTML information on a web page. A consistent and clean look is important to continue throughout all pages on a website. If your tests have Path locators, putting some effort to change them over to CSS files would be a smart investment that will impact tests throughout the design process.
For more details on how to write Path and CSS Selectors and use them as a maintainable and efficient locating strategy for their Selenium test automation, sign up for our Selenium Bootcamp, today!