title: Unable to access modal-dialogue in cypress
body: <p>I am trying to access modal-dialogue using cypress, what usually happens is that when you access the base Url, after 5-6 seconds, it will navigate user to modal-dialogue , where user have to login himself.</p>
  <p>following is the class name of dialog:</p>
  <pre><code>&lt;div class = &quot;modal-dialog&quot;&gt;
  </code></pre>
  <p>and I am trying to get access of email address field:
  </p>
  <p><strong>Check Screenshot of the page</strong></p>
  <p><img src="https://i.stack.imgur.com/kw1sK.jpg" alt="screenshot of the authentication dialog and the devtools output" /></p>
  <p>While using the following code:</p>
  <pre><code>describe('Login', function(){
      it('Login Successfully', function(){
          const urlRedirects = [];
          cy.visit('https://app.staging.showcare.io/product-showcase')
          cy.get('.modal-dialog').should('be.visible').then(($dialog)=&gt;{
        cy.wrap($dialog).find('#signInFormUsername').click()
        });
          })
          
      })
  </code></pre>
  <p>for which I am getting following error:</p>
  <pre><code>Cypress detected a cross origin error happened on page load:
  
    &gt; Blocked a frame with origin &quot;https://app.staging.showcare.io&quot; from accessing a cross-origin frame.
  
  Before the page load, you were bound to the origin policy:
  
  &gt; https://showcare.io
  
  A cross origin error happens when your application navigates to a new URL which does not match the origin policy above.
  
  A new URL does not match the origin policy if the 'protocol', 'port' (if specified), and/or 'host' (unless of the same superdomain) are different.
  
  Cypress does not allow you to navigate to a different origin URL within a single test.
  
  You may need to restructure some of your test code to avoid this problem.
  
  Alternatively you can also disable Chrome Web Security in Chromium-based browsers which will turn off this restriction by setting { chromeWebSecurity: false } in cypress.json.
  </code></pre>
  <p>Can someone please help me out?!</p>