Uploaded February 2024 | Updated September 2026, 1 week ago
In this video, I refactor another spec to replace manual data-driven testing with cypress-each plugin. Find the source code at github.com/bahmutov/basta-spring-2024-cypress-and-playwright and the final code in the branch "updated" Find the plugin at github.com/bahmutov/cypress-each
In this video, I refactor another spec to replace manual data-driven testing with cypress-each plugin. Find the source code at github.com/bahmutov/basta-spring-2024-cypress-and-playwright and the final code in the branch "updated" Find the plugin at github.com/bahmutov/cypress-each










![Remove Numbers From Strings
This video shows how to take multiple elements, remove numbers from each text, trim those strings, and confirm them.
cy.get(#fruit li) // jQuery Element[]
.map(innerText) // string[]
.mapInvoke(replace, /[ds]/g, ) // string[]
.should(deep.equal, [Apples, Grapes, Kiwi])
The retryable query commands cy.map and cy.mapInvoke come from my plugin https://github.com/bahmutov/cypress-map The full example is at https://glebbahmutov.com/cypress-examples Remove Numbers From Strings](https://i.ytimg.com/vi/OXiEJDjozQo/mqdefault.jpg)