Skip to main content

Cypress Update row in a Dynamic Smart Table

In previous example, we have inserted row in our dynamic smart table, in this tutorial we will try to update any record of the table. To update record first you need to search any value in table first, consider you don't have any search feature in table and you want to update one recently added record with email id

Cypress: Update row in a dynamic smart table

For that first you need to find the record by iterating through email column of each row and then you need to click on edit icon of that same row. Once you will click on edit icon, you will see tick mark and you will able to edit all the fields in the row as shown in below image:

cypress update table

Now, consider you want to update the age of the snow to 25, which is 20 right now and save the record by clicking on tick icon. After that you want to verify for the same row, with value age is updated to 25.


  it.only('update smart table', () => {
    // Visit home page

    // Click on Tables & Data in left menu
    cy.contains("Tables & Data").click()

    // Click on Smart Table menu in Table & Data
    cy.contains("Smart Table").click()

    // Find the row containing value
    cy.get('tbody').contains('tr','').then(tableRow =>{
      // Click on edit icon

      // Clear and update age column

      // Click on tick icon

      // Verify age value is updated by accessing the column by index

Submitted by tgoswami on August 18, 2021

Tarun has 11+ years of experience in Quality Assurance in different domains like Banking, E-commerce, Health and Education.


At ProgramsBuzz, you can learn, share and grow with millions of techie around the world from different domain like Data Science, Software Development, QA and Digital Marketing. You can ask doubt and get the answer for your queries from our experts.