📜  在柏树测试中获取类名 - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:22.154000             🧑  作者: Mango

代码示例1
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
    })
})