Questions tagged [cypress]

Cypress, an all-in-one testing framework and assertion library, complete with automatic waits, request mocking, and request stubbing

Cypress is an open-source end-to-end testing tool built to handle modern JavaScript frameworks well. Cypress doesn't use any language or driver bindings, all tests are written in JavaScript and executed inside the browser.

It doesn't use Selenium, whereas Selenium executes remote commands through the network, Cypress runs in the same run-loop as your application.

4405 questions
207
votes
10 answers

Cypress: Test if element does not exist

I want to be able to click on a check box and test that an element is no longer in the DOM in Cypress. Can someone suggest how you do it? //This is the Test when the check box is clicked and the element is…
Maccurt
  • 7,231
  • 5
  • 20
  • 36
104
votes
8 answers

Cypress: run only one test

I want to toggle only running one test, so I don't have to wait for my other tests to see the result of one test. Currently, I comment out my other tests, but this is really annoying. Is there a way to toggle only running one test in Cypress?
bkucera
  • 9,436
  • 6
  • 27
  • 42
92
votes
7 answers

In Cypress how to count a selection of items and get the length?

I'm starting to learn Cypress. I have a 4 row table (with a class of datatable). I can verify the number of rows this way: cy.get('.datatable').find('tr').each(function(row, i){ expect(i).to.be.lessThan(4) }) This is fine, but it seems…
Katharine Osborne
  • 3,663
  • 3
  • 27
  • 53
51
votes
8 answers

How to select nth item inside select element in cypress

say I have the HTML: