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.

Cypress doesn't open certain URLs - is blank screen

See original GitHub issue

Current behavior:

After installing Cypress doesn’t open any URL, even their examples. Run with React.js.

Steps to reproduce: (app code and test code)

Cypress was installed as follows

npm install cypress --save-dev

and open

node_modules/.bin/cypress open

Code from example

context('Actions', () => {
  beforeEach(() => {
    cy.visit('https://example.cypress.io/commands/actions')
  })
//...//
})

Cypress open link http://localhost:50702/__/#/tests/integration/examples/actions.spec.js and nothing happens.

Versions

2.4.1

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:19 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
debasisjcommented, May 20, 2021

is there an official fix for this issue from Cypress. I am using the latest and it’s kind of pretty annoying

1reaction
MuckTcommented, Mar 22, 2021

A fix for ‘hollisterco’ site that others might be able to apply using a workaround from @dudziakm

Add to your commands.js

// -- Visit multiple domains in one test
Cypress.Commands.add('forceVisit', url => {
  cy.window().then(win => {
    return win.open(url, '_self');
  });
});

test.spec.js

describe('Hollisterco.com', () => {
  it('visits page & accepts cookies', () => {
    cy.forceVisit('https://www.hollisterco.com');
    cy.get('#site-cookie-banner .secondary-button').first().click();
    cy.get('#ccpa-hco-logo').should('exist')
  });
});

Screenshot: image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visit The Blank Page Between Cypress Tests
A good solution to clearly separate the tests and stop any application callbacks is to visit a "neutral" blank page. Unfortunately, using the...
Read more >
Troubleshooting
Open Cypress via cypress open · Go to Developer Tools -> View App Data · This will take you to the directory in...
Read more >
Blank page after running Cypress tests
contains( "Testing Next.js Applications with Cypress" ) }) it("the features on the homepage are correct", () => { cy.get("dt") ...
Read more >
Accessing a new window in Cypress tests
Out of the box, Cypress lacks support for testing across multiple tabs and multiple windows. In this article we'll cover some workarounds that ......
Read more >
cypress-io/cypress - Gitter
I am getting a blank page, instead of sidebar coming from the right, while clicking a button. The URL does not change. Any...
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