Uploaded January 2024 | Updated September 2026, 1 week ago
DOM input elements have a property "labels" that links the label elements for that input element. In this video, I show how to access a single label and how to check each label one by one. Find the full source code at glebbahmutov.com/cypress-examples
DOM input elements have a property "labels" that links the label elements for that input element. In this video, I show how to access a single label and how to check each label one by one. Find the full source code at glebbahmutov.com/cypress-examples



![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)






