Skip to content

Example of using window.open in Cypress instead of iframe

Notifications You must be signed in to change notification settings

jakedowns/cypress-open-child-window

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cypress-open-child-window

Example using window.open to "pop" application and test it from Cypress test runner. This allows top === self and bypasses what many windows do to frame-bust, see cypress/issues/886.

Read Cypress using child window.

See cypress/integration/spec.js, but basically there is a custom command cy.openWindow that uses window.open to create a child window linked back synchronously to the opener window. This still lets Cypress work.

Child window

To execute (note, requires Chrome browser):

npm run dev

Time traveling debugger should still work - and it shows the snapshots in the iframe, not in the child window

Debugging

About

Example of using window.open in Cypress instead of iframe

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 88.4%
  • HTML 11.6%