https://cypress.io logo
It turned out to select the desired element using ...
# e2e-testing
q
It turned out to select the desired element using .each ()
Copy code
.find('td.day').each(($td, index, $list) => {
      if ($td.hasClass("active")) {
        cy.wrap($list).eq(index + 1).click();
      }
    })
If there is an easier way, please tell me