Topic: cypress - lecture 9 - traversal methods - lecture 4

//Regular lecture 35: 14-Nov-2022

//*Topic*//cypress - lecture 9//
//traversal methods: lecture 4

describe("traversal methods", function(){

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

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

    it(".parents() method", function(){
        cy.visit("https://www.webdriveruniversity.com/Data-Table/index.html")
        cy.get('[id="milk"]').parents()
    })

    it(".parentsUntil() method", function(){
        cy.visit("https://www.webdriveruniversity.com/Data-Table/index.html")
        cy.get('[id="milk"]').parentsUntil('div[class="container"]').eq(0)
    })
})

टिप्पण्या