cypress: Page doesn't load as expected
Bug
I wanna test ad unit’s using cypress. But when i open this url in cypress - https://www.tripsavvy.com/when-should-you-get-your-luggage-wrapped-4146609?kw=TEST4534121759 - ad unit’s load broken
Current behavior:

Desired behavior:

How to reproduce:
Just open this url using cypress cy.visit(“https://www.tripsavvy.com/when-should-you-get-your-luggage-wrapped-4146609?kw=TEST4534121759”);
Test code:
'use strict';
describe('FIU', () => {
it('FIU', () => {
cy.visit("https://www.tripsavvy.com/when-should-you-get-your-luggage-wrapped-4146609?kw=TEST4534121759");
});
});
Additional Info (images, stack traces, etc)
I was trying to set “chromeWebSecurity”: false , but it didn’t help
Thank you!
- Operating System: Mac Os Hight Sierra 10.13.3
- Cypress Version: 2.1.0
- Browser Version: Chrome 65.0.3325.181, see same issue on Electron 59, and Canary 67
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 2
- Comments: 16 (5 by maintainers)
@maxim94plyasunov It appears your ad is using “frame busting” to get access to the root document’s page from the iframe and set the height/width of itself. By default Cypress blocks this from happening so the app can’t mess up Cypress’s Test Runner, which runs your app inside an iframe itself. There is an option to disable this by setting
modifyObstructiveCode=falsein cypress.json, but that still might not fix your problem. I tried to display your webpage from an iframe in Chrome, and it didn’t work, giving me this errori’am facing the same issue , and ADS are not showing up while running it through cypress ,any fixes yet? modifyObstructiveCode=false and 'chromeWebSecurity": false are not working .