title: I need to access a new window which pops after a button is clicked
body: <p>I need to access the new window which pops after a button is clicked.</p>
  <p>I used <code>cy.get('.app-card__content').click()</code> to click on the button called <code>Create a new plugin</code>. After I click on the button the App is created on a new window and I do not know how to get the window and continue my test.</p>
  <p>This new window URL is dynamic and every time anyone clicks on it the number which is App ID increases.</p>
  <p>For example:</p>
  <p><a href="https://www.website.io/apps/app_name/standalone?id=DYNAMIC_ID_NUMBER" rel="nofollow noreferrer">https://www.website.io/apps/app_name/standalone?id=DYNAMIC_ID_NUMBER</a></p>
  <p>I was able to log into the website and create a new App, however, I don't know how to grab the new window with the URL.</p>
  <p>I could not get this code to work:</p>
  <pre><code>describe('window open', function () {
    beforeEach(function () {
      cy.visit('/index.html', {
        onBeforeLoad(win) {
          cy.stub(win, 'open').as('windowOpen')
        }
      })
    })
  
    it('see window open being called with url', function () {
      cy.get('#open-window').click()
  
      cy.get('@windowOpen').should('be.calledWith', 'page1.html')
    })
  })
  
  
  Here is the code I wrote:
  
  // This test consists of Accessing Staging and Create a new App.
  // Go to website.io.
  describe('Staging Test v1', function(){
      it('Accessing Staging', function(){
          cy.visit('https://www.website.io')
          cy.wait(2000)
      })
  
      // Get login button.
      it('Get login button', function(){
          cy.get('.signed-out-container &gt; .signInTab').click()
          cy.wait(2000)
      })
  
      // Fill out the modal and log in
      it('Fill out the modal and log in', function(){
          cy.get('#sign_in_email').type('user@website.io', {delay:110}).should('have.value', 'user@website.io')
          cy.wait(1000)
  
          cy.get('#new_sign_in_password').type('password', {delay:110}).should('have.value', 'password')
          cy.wait(1000)
  
          cy.get('#sign-in-submit').click()
          cy.wait(6000)
      })
  
      // Click on new Create New Plugin button.
      it('Click on create a new plugin button', function(){
          cy.get('.dashboard-header__create-new-container &gt; .button').should('be.visible').click({force:true})
          cy.wait(2000)
      })
  
      // Search and create a new App
      it('Search and create a new App', function(){
          
          cy.get('.app-search__search-input').click({force:true}).type('App name', {force:true})
          cy.wait(3000)
          cy.get('.app-card__content').click()
          cy.wait(10000)
      })
  
      // Grab the new window to continue the test
  
      // Need to find out how to grab the new window passing along cookies and sessions to remain logged in.
  
      // Develop part 2 of the test
      
  
  })
  </code></pre>
  <p>I need to create a new App which pops on a new window, grab the new window and continue the rest of the test.</p>
  <p>I also need to remain logged in on the new window as I need to save the App.</p>