Then I should see "operation" in "text" row

Asserts that a piece of text is (or is not) present inside a table row that is identified by other text in the same row. The first parameter is the expected text, the second identifies the row: the step scans every <tr> on the page, keeps the rows whose text contains the row identifier, and passes if any of them also contains the expected text. This is the standard way to verify a cell value in listing pages such as user tables, order lists, or content overviews.

Both matches are plain case-sensitive substring checks against the row's full text content. Gotcha: if the row identifier matches more than one row, the assertion passes as soon as any matching row contains the expected text, so pick an identifier that is unique on the page (an email address or an exact title works well).

Accepted phrasings

Then I should see "text" in the "row" row
Then we should see "text" in the "row" row
Then should see "text" in "row" row
Then I should not see "text" in the "row" row
Then we should not see "text" in the "row" row

Examples

Then I should see "Active" in the "John Smith" row
Then we should see "Processing" in the "Order #12345" row
And I should see "Admin" in the "john.smith@example.org" row
Then I should not see "Out of Stock" in the "Product A" row

In a real scenario

Feature: Content overview shows correct row data

  Scenario: The content listing shows the homepage type and hides drafts
    Given I am a logged in user with the "sitemanager" user
     When I go to "https://example.org/admin/content"
      And wait 2s
     Then I should see "Homepage"
      And I should see "Landing page" in the "Homepage" row
      And I should see "Published" in the "Homepage" row
      And I should not see "Draft" in the "Homepage" row

Related steps

Back to Assertion Steps