Cypress using child window

1 · Gleb Bahmutov · Sept. 4, 2019, 3:18 a.m.
Summary
Normally, Cypress test runner loads your site inside an iframe. This allows the "top" parent window, controlled by Cypress a direct access to your site. Nice, but many sites work hard to avoid being iframed. Cypress already strips X-frame protection headers, and "fixes" most common frame-busting JavaScript code like if (top !== self).Imagine the website using the following frame-busting code, and it somehow slipping Cypress JS regex12345678<script> if (top !== self) { console.log('top !== se...