title: In case cypress finds the path and is stuck with not.exist error
body: <p>I want to compare path Alert with ExpectedResult, but now the programer not check script in this part,  so I use not.exist to skip case that Path Alert is not found, but in case that path Alert is found, Cypress program still reads . not.exist, and I want it to run through it without getting this error.</p>
  <blockquote>
  <p>Timed out retrying after 4000ms:<br />
  Expected <code>&lt;li&gt;</code> not to exist in the DOM, but it was continuously found.</p>
  </blockquote>
  <pre class="lang-js prettyprint-override"><code>if (cy.get('.help-block &gt; ul &gt; li').should('not.exist')) {
              cy.get('.help-block &gt; ul &gt; li').should('not.exist').then((Path_Alert) =&gt; {
                console.log(Path_Alert)
                if (Path_Alert == null) {
                  cy.log(data.rows[i].ExpectedResult)
                  ErrorSuggestion = cy.log('Not Alert or Alert Not Match').as('ErrorSuggestion')
                }
              })
              cy.get('#swal2-title').should('be.visible').invoke('text').then((text) =&gt; {
                if (text == 'พบข้อผิดพลาด!' || text == 'การเพิ่มสำเร็จ!') {
                  cy.log(text).as('Alert_Popup')
                  if (text == 'พบข้อผิดพลาด!') {
                    result = 'Fail'
                    cy.log(result).as('Result')
                    cy.get('.swal2-confirm').click()
                  } else if (text == 'การเพิ่มสำเร็จ!') {
                    cy.get('.swal2-confirm').click()
                  }
  
                }
              })
            } else {
              if (cy.get('.help-block &gt; ul &gt; li').should('be.visible')) {
                cy.get('.help-block &gt; ul &gt; li').should('be.visible').then((Path_Alert) =&gt; {
                  console.log(Path_Alert)
                  if (expect(Path_Alert).equal(data.rows[i].ExpectedResult)) {
                    result = 'Pass'
                    cy.log(result).as('Result')
                  }
                })
              }
  
              cy.get('#swal2-title').should('be.visible').invoke('text').then((text) =&gt; {
                if (text == 'พบข้อผิดพลาด!' || text == 'การเพิ่มสำเร็จ!') {
                  cy.log(text).as('Alert_Popup')
                  if (text == 'พบข้อผิดพลาด!') {
                    result = 'Fail'
                    cy.log(result).as('Result')
                    cy.get('.swal2-confirm').click()
                  } else if (text == 'การเพิ่มสำเร็จ!') {
                    cy.get('.swal2-confirm').click()
                  }
  
                }
              })
            } 
  </code></pre>
  <p>Test image</p>
  <p><img src="https://i.stack.imgur.com/fWNGm.jpg" alt="enter image description here" /></p>