Skip to content

← All questions

How do you assert on a row in a table without writing a CSS chain?

Asked 8,120 views2 answers

Orders table, and the scenario I want reads:

gherkin
Then order "1042" should show status "Shipped"

What I have in the page object is this, which works until someone sorts the table or the row moves to page two:

ts
this.page.locator('tbody tr:nth-child(3) td:nth-child(4)');

Is there a table-aware step I have missed, or is this a page-object job?

asked by Sunita Kale982 ·

2 answers

Have the same question?

Ask it with the command you ran and the output you got, and it will be answered here.

Ask a question

Related