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.

cy.visit() on a specific URL ends the test prematurely

See original GitHub issue

Current behavior

cy.visit(‘https://who--spmstage.sandbox.lightning.force.com/lightning/page/home’) with a baseUrl is ending the test execution prematurely without any feedback. The spec starts to run, then stops, and comes back to the Specs screen with no extra information. I tried the same thing with google.com and it works just fine. Seems as though something about this URL is causing a weird behavior.

Desired behavior

In this situation, Cypress should finish execution and provide some helpful logs to let me know what to do and why this URL isn’t opening.

Test code to reproduce

cypress.zip Attaching a repo to reproduce this issue.

Cypress Version

10.8.0

Node version

16.15.1

Operating System

macOS 12.5

Debug Logs

No response

Other

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nagash77commented, Sep 16, 2022

This is great. We will have a developer take a look. Thanks for the quick response!

0reactions
chrisbreidingcommented, Oct 7, 2022

Great! Thanks for following up. I’m going to close this as resolved, since using experimentalModifyObstructiveThirdPartyCode is our recommended way to avoid such frame-busting issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cy.visit() on a specific URL ends the test prematurely · cypress-io ...
Fast, easy and reliable testing for anything that runs in a browser. - cy.visit() on a specific URL ends the test prematurely ·...
Read more >
visit - Cypress Documentation
visit() yields the window object after the page finishes loading. It is unsafe to chain further commands that rely on the yielded window...
Read more >
Cypress clicks Angular link too early - Stack Overflow
A normal Test would open the Site with cy.visit('/') and after the Load it starts to navigate on the site using buttons on...
Read more >
What are before and beforeEach hooks in Cypress?
Cypress hooks carry out certain operations before or after each test. ... we have to write a couple of tests in which we...
Read more >
A Better cy.each Iteration - Gleb Bahmutov
A Better cy.each Iteration. How to iterate over elements and even perform an early stop. You can find these tests in the repo ......
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