Most often, test frameworks are developed from scratch and gradually extended with the required functionality. This approach is perfectly normal, but carries the risk of creeping technical debt as well as poor maintainability, transparency and extensibility. These risks can be minimized by using clean software architecture. In this talk for Selenium Conference 2022, I will present two key parts of our internal Selenium-based end-to-end testing framework, which has been successfully used to test multiple web projects using desktop and mobile browsers during the past five years: the plugin infrastructure using Java's Service Provider Interface the custom WebElement decorator that enables more resilient Selenium WebElements I will explain the rationale for using these architectural tools and how these approaches mean that we can still evolve this framework quickly and easily to meet new needs.