Friday, November 7, 2025
2 changes · 18.0
Enhancements to existing features
The test selector system now supports an exact text match shortcut, making test scripts easier to read and maintain. This replaces more complex regular expression patterns with a clearer option, improving the developer experience without changing business behavior.
Original PR description
This commit adds the ':text()' pseudo-class to the list of supported pseudo-classes in Hoot selectors. Its purpose is the same as ':contains()', with the specificity of being an *exact* match instead of a *partial* one. It effectively replaces ':contains(/^<expression>$/)' by ':text(<expression>)', improving the readability and making the developer experience a bit nicer. Enterprise: https://github.com/odoo/enterprise/pull/98772 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update standardizes how test scripts look for text on screen, replacing older matching patterns with a clearer text-based approach. It helps keep automated checks more reliable and easier to maintain, without changing business functionality.
Original PR description
This commit replaces all found occurrences where ':contains' (with an exact match regular expression) could be replaced by ':text'. Community: https://github.com/odoo/odoo/pull/234331