Script unable to perform conditional exit looping #30624
SravanthiS123
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi ,
I am new bie to Cypress. My requirement is to use 2 loops where the script has to abort both the loops based on a condition. In the below code, here the inner loop is found to be getting exited but the external loop is still with the old values of method variables and loop variables. The exit flags (_exitFLag, sysIdArr) - that are being set when the exit criteria condition is met, are not found to be on new updated values when it comes to external loop. Please help me to fix the issue.
cy.get(
${workQPg.elements.sysIDLnkLocStr}
).then($el => {cy.log("claimCount - " + $el.length);
for (let i = 0; i < $el.length; i++) {
Beta Was this translation helpful? Give feedback.
All reactions