Cypress Cross Origin error with Chrome despite the chromeWebSecurity to false
See original GitHub issueCurrent behavior
We have a test that needs to click to an element leading to an external url. Once the url is loaded some checks happen. We used to have the test working on 9.7. But since the migration to 10.4.0 we have this test failing with the error explaining to add the chromeSecurity flag to false but we already have it set on the cypress.config.js. Maybe a small detail here : we call cypress with our own config.js provided with a path.
Desired behavior
The test should work as before since the security flag is disabled.
Test code to reproduce
afterEach(() => {
cy.url().should("include", EXTRA_INFORMATION);
});
it("Opens an external url with extra information on element click", () => {
cy.get(SELECTOR)
.first()
.click();
});
Cypress Version
10.4.0
Other
Running on windows 10
Issue Analytics
- State:
- Created a year ago
- Comments:23 (11 by maintainers)
Top Results From Across the Web
Web Security - Cypress Documentation
Set chromeWebSecurity to false · Display insecure content · Navigate to any superdomain without cross-origin errors with or without cy.origin · Access cross-origin...
Read more >{ "chromeWebSecurity": false } seems not work as expected
Chrome console displays "refused to display "https://......." in a frame because it set 'X-Frame-Options' to 'sameorigin'. I'm testing an app ...
Read more >Disable Chrome Web Security for Cypress Testing
I have multiple tests where 1 test requires chromeWebSecurity to be true and another test that requires chromeWebSecurity(iFrames CORS error) to ...
Read more >Configuring Cypress to work with iFrames & cross-origin sites.
Access cross origin iframes that are embedded in your application. Simply by setting chromeWebSecurity to false in your cypress.json { "chromeWebSecurity": ...
Read more >Web Security - Cypress - w3resource
Access the cross-origin iframes that are embedded in your application. To disable web security, you will need to set chromeWebSecurity to false ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK i found some little time and was able to easily reproduce : https://github.com/AurelienKun/demo
Same 104 version. You can see it on the screenshot I have provided 😃
Great ! I’ll give it a try soon. I’ll keep you updated as soon as I get some logs.