https://cypress.io logo
Hello all What is the best practice to cy.get the...
# best-practices
w
Hello all What is the best practice to cy.get the row from following table where title is "b". Equivalent to following javascript snippet:
Copy code
[
    { id: 1, title: 'a' },
    { id: 2, title: 'b' },
  ].find(row => row.title === 'b');
Copy code
<table>
        <thead>
          <tr>
            <td>ID</td>
            <td>Title</td>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>1</td>
            <td>a</td>
          </tr>
          <tr>
            <td>2</td>
            <td>b</td>
          </tr>
        </tbody>
      </table>