title: Cypress alert (pop-up) login at visit url
body: <p>I have strange problem.
  I want to automate one web site using Cypress. At the begining I need to enter credentials like username and password into the alert (pop-up) window. I tryed a lot of ways to handle this.
  Here is my code that I used for handling alert (pop-up) windows, that contains input text element:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>cy.window().then(($win) =&gt; {
  cy.stub($win, 'prompt').returns(text)
  cy.get(#randomId).click()
  })</code></pre>
  </div>
  </div>
  </p>
  <p>I wasn't sure if this is the correct way to handle this, thats why I tryed one package named: <a href="https://www.npmjs.com/package/cypress-ntlm-auth" rel="nofollow noreferrer">cypress-ntlm-auth</a>. I tried to use this package, because it seems that the package handles &quot;Windows Authentication login&quot; when visiting a site for the first time. Here is the code that I tried:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>cy.ntlm(['chiquito-qa.omnifitrgsites.co.uk'], "tainae", "nekazvam", "chiquito-qa");
  cy.visit('chiquito-qa.omnifitrgsites.co.uk');</code></pre>
  </div>
  </div>
  </p>
  <p>Btw the credentials are not real.</p>