- Cypress
get
orfind
selecet elements based on (CSS selectors)[https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors] - Cypress
get
looks in the whole DOM and it usually returns #all# elements matching the selecotr. You can use.eq(n)
to get the nth element. - Cypress
find
ususally used afterget
and looks inside the parent element.
- cy.get('css_selector').its('href')
- cy.get('a').each( ($element, index, $list){ cy.wrap($element).its('href');