Uploaded December 2023 | Updated November 2026, 1 day ago
This video shows how to build a chain of query commands that extract the CSS color of an element which is a string like "rgb(red, green, blue)" and then parse it using named capturing groups, then convert strings into numbers and assert each number. Because we use only queries, the entire chain will retry until the element does change its color into the expected red-only value. Find the full source code at glebbahmutov.com/cypress-examples/. Tip: I use "cypress-map" plugin to bring queries like cy.print and cy.map into my specs github.com/bahmutov/cypress-map
This video shows how to build a chain of query commands that extract the CSS color of an element which is a string like "rgb(red, green, blue)" and then parse it using named capturing groups, then convert strings into numbers and assert each number. Because we use only queries, the entire chain will retry until the element does change its color into the expected red-only value. Find the full source code at glebbahmutov.com/cypress-examples/. Tip: I use "cypress-map" plugin to bring queries like cy.print and cy.map into my specs github.com/bahmutov/cypress-map










