Privacy Policy and Cookies

By continuing to use our site, you agree to our Privacy Policy and our use of cookies to understand how you use our site, and to improve your experience. Learn More.
I Agree.

SmartClient 13.1: Cypress testing and search locators

Last modified date

SmartClient 13.1: Cypress testing and search locators

SmartClient 13.1 advances how developers approach automated testing and makes locators even more intuitive.

Testing frameworks are integral to ensuring application stability. SmartClient’s remarkable new tools, including Cypress integration and Search Locators, are built for just that purpose.

This blog post will cover these two new feature additions in 13.1.

Full support for Cypress testing

Cypress testing support in SmartClient 13.1

End-to-end testing is a critical component of modern development workflows, and SmartClient now offers full support for Cypress. This modern testing framework is rapidly gaining popularity among developers due to its simplicity and speed. With SmartClient 13.1, we’ve made Cypress an even more compelling option for your test suites.

Cypress allows you to write tests in clear, concise JavaScript, which makes it a natural fit for SmartClient developers. Unlike Selenium, Cypress runs directly within the browser in a more integrated and accurate testing environment. Its architecture eliminates many of the flakiness issues that can plague traditional browser automation tools, making it faster and more reliable.

For developers familiar with SmartClient’s testing frameworks, integrating Cypress into your existing setup is straightforward, and its benefits for testing large, complex web applications are immediate.

Key Benefits:

  • Seamless Integration with SmartClient’s Locator System: SmartClient’s locator system ensures that your tests are not tightly coupled to DOM structures that may change. This eliminates the need for fragile element locators like CSS selectors or XPath queries. Instead, locators abstract the identification of interactive components, ensuring your tests remain stable across skins, auto-sizing changes, or DOM structure shifts.
  • Cross-Browser Consistency: Cypress integrates smoothly with SmartClient’s cross-browser testing capabilities, allowing tests to run consistently on all major browsers.
  • Faster Execution: Compared to traditional Selenium-based setups, Cypress can run tests significantly faster. For applications that involve a lot of user interaction, this speed advantage can shave valuable minutes off each test run, which adds up in large test suites.

You can find the official documentation for integrating Cypress with SmartClient here: SmartClient Cypress Documentation.

Enhanced search locators

An effective testing suite depends on reliable element locators. With Search Locators in SmartClient 13.1, we’ve taken our existing locator system and made it even more powerful. Search Locators allow you to identify elements using salient attributes rather than relying on specific DOM structures. This ensures that your tests are both readable and resilient to changes in your UI.

Here’s how Search Locators simplify testing:

  • Abstracted element identification: Search Locators allow you to identify components by their function or attributes rather than their position or structure in the DOM. For example, you can locate a ListGrid within a particular Window using a clear, easy-to-read locator:

    Window[ID="mainWindow"]/body//ListGrid[dataSource="someDS"]
  • Compact and readable: Locators like the example above are short, clear, and easy to maintain. This simplicity means that tests are less likely to break when the DOM structure changes or when UI components like skins or auto-sizing are updated.
  • Cross-skin and cross-browser compatibility: Since SmartClient’s locators are not tied to specific HTML elements, they are immune to changes in skinning, browser rendering differences, and even DOM restructuring. This makes your tests far more resilient to updates in the application’s UI or underlying technology stack.

For more details on how to use locators and incorporate Search Locators into your test scripts, check out our AutoTestLocator Documentation.

Why these features matter

The combination of Cypress integration and enhanced Search Locators means that testing your SmartClient applications has never been easier or more reliable. These features work together to ensure that:

  • Tests are faster to write and quicker to execute.
  • Test scripts are more maintainable, thanks to SmartClient’s abstract locator system.
  • Tests are robust and can handle changes in UI structure without frequent breakages.

SmartClient 13.1 is built for enterprise-level applications, and these new tools help developers maintain a high standard of test coverage while minimizing the time spent maintaining test suites. Whether you are running large-scale, mission-critical applications or small, data-driven web apps, these new testing tools will make a measurable difference in the stability and performance of your project.