diff --git a/docs/src/api/class-locatorassertions.md b/docs/src/api/class-locatorassertions.md index 837f7696c7..4b79cd1213 100644 --- a/docs/src/api/class-locatorassertions.md +++ b/docs/src/api/class-locatorassertions.md @@ -1614,16 +1614,16 @@ await expect(page.locator("ul")).to_have_text(["Text 1", "Text 2", "Text 3"]) from playwright.sync_api import expect # ✓ Has the right items in the right order -await expect(page.locator("ul > li")).to_have_text(["Text 1", "Text 2", "Text 3"]) +expect(page.locator("ul > li")).to_have_text(["Text 1", "Text 2", "Text 3"]) # ✖ Wrong order -await expect(page.locator("ul > li")).to_have_text(["Text 3", "Text 2", "Text 1"]) +expect(page.locator("ul > li")).to_have_text(["Text 3", "Text 2", "Text 1"]) # ✖ Last item does not match -await expect(page.locator("ul > li")).to_have_text(["Text 1", "Text 2", "Text"]) +expect(page.locator("ul > li")).to_have_text(["Text 1", "Text 2", "Text"]) # ✖ Locator points to the outer list element, not to the list items -await expect(page.locator("ul")).to_have_text(["Text 1", "Text 2", "Text 3"]) +expect(page.locator("ul")).to_have_text(["Text 1", "Text 2", "Text 3"]) ``` ```csharp