docs(python): remove await in sync code snippet (#24124)
This commit is contained in:
parent
b4ffb848de
commit
6ab6cde929
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue