freezing-activity-66869
05/22/2023, 1:24 AMfresh-van-73810
05/24/2023, 3:10 PMcy.get('body').then((body) => if( body.find(selector-to-potential-input).length > 0) {
cy.get(selector-to-potential-input
})}
Like i mentioned it would be better to just ensure it in the beginning because this could theoretically flake on the find and say its not there but the field exists and so on ^^. More info on conditionals https://docs.cypress.io/guides/core-concepts/conditional-testingfreezing-activity-66869
05/24/2023, 4:43 PMfresh-van-73810
05/25/2023, 9:30 AM