Most modern web applications are frequently updated to implement new features or enhance their UX with new libraries or APIs, making designing flexible and long-lasting tests challenging due to constant UI updates. To address this challenge, many synthetic tests include locators, which are unique identifiers used to label each element in an app, enabling the tracking of shifting UI elements through different design iterations. Locators can be created using CSS or xPath selectors, both of which have their advantages and disadvantages. CSS selectors provide a more straightforward approach but may not cover all use cases, while xPath selectors offer more advanced querying options but require a higher learning curve. Understanding the strengths and weaknesses of each approach is essential for designing effective synthetic tests tailored to specific needs. Additionally, tools like Datadog Synthetic Monitoring can help teams create tests that can withstand UI changes by providing out-of-the-box testing templates and customizable locators with scripting knowledge not necessary.