Cypress basics: Check attributes, value and text - Filip Hric Or if you need to use jQuery functions on it, then you can use Cypress.$: cy.get. cy url contains. Cypress App | Cypress Documentation Similar to the check commands, there exists the uncheck commands in Cypress. In action, it looks like this: The HTML markup below has only the input color element. assert input value cypress. Here we want to execute the else condition. In some cases it may be useful to execute certain actions while a given condition is true. Now to simulate that we wrote body.find('wrongLocator').length > 0.Here wrongLocator is just some dummy text so that we don't get the element and then the else condition is executed. The option force is used by Cypress to interact with hidden elements and then forces to check the checkbox internally. (If there's more than one result, you may need to chain further filters/functions to specialize the result until you get to the single element you want to interact with). Cypress - Hidden Elements - Tutorials Point The code example above waits for 5 seconds before verifying the existence of an element on the page. How to check if element exists using Cypress.io - NewbeDEV Handling with only visible elements in Cypress Cypress Test Automation Software Testing After a test case is run on Cypress, we need to debug and understand the logs in case of a failure. cy.contains('Any text').should('be.visible') In the second example, we know that the text will be present in a specific HTML element. Cypress - Hidden Elements - Tutorials Point 1 2 3 4 cy.wait(5000); // Just to make sure everything is loaded. Checkbox verification with Cypress - Tutorials Point Elements that are not in a document are considered hidden; jQuery does not have a way to know if they will be visible when appended to a .