Handling Visible and Invisible Elements
These are several instance in a website where when you input a particular value the element or an part of page will be invisible.
For an instance if we were to test this behavior then we can test them by applying a simple assertion using SHOULD. In this post we will teach you how to excatly do that.
CODE
/// <reference types = "Cypress" /> 
describe('Element Visibility',function(){ 
context('Test Cases',function(){ 
it('Test 01',function(){ 
cy.visit('https://rahulshettyacademy.com/AutomationPractice/') 
cy.get('#hide-textbox').click() cy.get('#displayed-text').should('not.be.visible') cy.get('#show-textbox').click() cy.get('#displayed-text').should('be.visible') 
}) 
})
})EXPLANATION
dsdd