Answers for "getting class name in cypress testing"

0

getting class name in cypress testing

describe("test worked succesfully", ()=>{
	beforeEach(()=>{
    	cy.visit("http://localhost:3000/");
    });
	test("should get class name", ()=>{
    	cy.get(".yourClassName").should("exist");
        //getting by class name is not recommended 
        //visit this to learn more=>https://docs.cypress.io/guides/references/best-practices#Selecting-Elements
    })
})
Posted by: Guest on October-16-2021

Code answers related to "getting class name in cypress testing"

Browse Popular Code Answers by Language