question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

window.alert hold page load forever even chromeWebSecurity set to false

See original GitHub issue

Current behavior:

My app require to test third-party payment, so I have to setup chromeWebSecurity to false.

After redirect to different superdomain, the alertbox won’t be auto accepted.

An_embedded_page_at_127_0_0_1_8081_says_and_cypress_alert_issue_and_alert_html_—_cypress_alert_issue

Desired behavior:

The alert box should be auto accepted.

Steps to reproduce: (app code and test code)

Here is the repo to reproduce, steps in the README.md.

https://github.com/zackexplosion/cypress-alert-issue

test code is very simple.

describe('alert will hold page load', function() {
  it('forever', function() {
    // Just a blank page. 
    cy.visit('http://127.0.0.1:8080')
    
    // after form submit, it will redirect to http://127.0.0.1:8081/alert, and the alertbox won't be accepted.
    cy.get('#_form_aiochk').submit()
  })
})

Versions

Cypress: 3.2.0 MacOS: 10.13.6 Browser: Chrome 74.0.3729.131

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jennifer-shehanecommented, Jul 11, 2019

I can recreate this from this repo: https://github.com/zackexplosion/cypress-alert-issue Likely does not work because the alert is being called from the new url being navigated to.

0reactions
chadfauriecommented, Aug 11, 2020

Did anyone find a solution for this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Web Security - Cypress Documentation
Setting chromeWebSecurity to false in Chrome-based browsers allows you to do the following: Display insecure content; Navigate to any superdomain without cross- ...
Read more >
Disable Chrome Web Security for Cypress Testing
So I want to be able to change chromeWebSecurity before the test starts and not in Cypress.json. cy.log(Cypress.config("chromeWebSecurity")); ...
Read more >
cypress-io/cypress - Gitter
Cypress detected a cross origin error happened on page load: ... "chromeWebSecurity": false causes the tests to break with chrome-error://chromewebdata url.
Read more >
YOU54F – Breaking stuff daily
Ron Holshausen (at the time at DiUS, still one of the present day maintainers of Pact, ... Simply by setting chromeWebSecurity to false...
Read more >
Everything You Need to Know About Cookies for Web ...
The server checks your login information, and if everything looks good, it sends the data needed to render the page back to your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found