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.

Close the cypress browser after executing all testcases

See original GitHub issue

#3894

Step 1: npx cypress open Step 2: Click on spec file that i need to check

**Expected : Once the execution of spec file completed , browser should automatically close.

Actual : Not able to close cypress browser automatically like we do in protactor and selenium.**

How to achieve this mechanism?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Songyu-Wangcommented, Apr 5, 2019

The cypress open is designed to keep open when we are developing tests, the file watcher will detect code change and rerun updated test. If browser is automatically close, that feature will be useless.

0reactions
jennifer-shehanecommented, Jun 10, 2019

@nataliaroshchyna Closing the browser window through a Cypress command is not supported.

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to close the current window/tab using cypress
If you separate the cases in different test files it will close the whole browser and reopen it every time. This is the...
Read more >
end - Cypress Documentation
.end() is useful when you want to end a chain of commands and force the next command to not receive what was yielded...
Read more >
Command Line - Cypress Documentation
By default, Cypress will run tests headlessly during cypress run . Passing --headed will force the browser to be shown. This matches how...
Read more >
Troubleshooting | Cypress Documentation
After running this command, you will need to run cypress install before running ... Tip: use the cypress info command to see all...
Read more >
Best Practices - Cypress Documentation
Every test you write will include selectors for elements. ... After running your test, instead of trying to cy.visit() GitHub, you can use...
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