WebTable Handling:
Getting the table header cell elements
cy.get("th") //selects the table header elementsAccessing the Rows and Column elements
cy.get("tr") //selects the row elements
cy.get("td") //selects the columns elements
cy.get("tr td") //selects the columns elementsAccessing the Specific web table elements with assertions
cy.visit("https://www.seleniumeasy.com/test/table-search-filter-demo.html")
cy.get("tr td:nth-child(2)") //Gets the 2nd child in td column
.eq(1) //Yields second matching css element
.contains("sometext")
.should('be.visible')Accessing the web table elements with text
Accessing the Siblings web table elements with elements found
Last updated