Topic: cypress - lecture 6 - traversal methods - lecture 1

//Regular lecture 32: 11-Nov-2022

//*Topic*//cypress - lecture 6//
//traversal methods: lecture 1


///<reference types = "Cypress"/>

describe("traversal methods", function(){

    it(".children() method", function(){
        cy.visit("http://www.webdriveruniversity.com/Data-Table/index.html")
        cy.get('[class="traversal-drinks-list"]').children()
        cy.get('[class="traversal-food-list"]').children()
    })

    it.only(".parent() method", function(){
        cy.visit("http://www.webdriveruniversity.com/Data-Table/index.html")
        cy.get('[id="fruits"]').parent().should('have.class', 'traversal-food-list')
        cy.get('[id="types-of-jobs"]').parent().should('have.class', 'traversal-job-list')
    })

})

टिप्पण्या