bland-pharmacist-88362
06/23/2022, 4:13 PMvar found = false
function checkButton() {
cy.wait(500)
cy.get('body').then(($body) => {
if ($body.find('.startButton').filter(':visible').length) {
found = true
}
})
console.log(found)
return found;
};
cy.get('mat-panel-title').should('be.visible')
.then(
each(
($el) => {
console.log(found)
if (found === false) {
cy.wrap($el).click();
}
},
() => checkButton() === true,
),
)