Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
docs: fix containsText example in ports (#38899)
Yury Semikhatskyf50cd12eaa18
diff --git a/docs/src/api/class-locatorassertions.md b/docs/src/api/class-locatorassertions.mdindex f7c5e9028f..d240271a4f 100644--- a/docs/src/api/class-locatorassertions.md+++ b/docs/src/api/class-locatorassertions.md@@ -1216,7 +1216,7 @@ await expect(page.locator('ul')).toContainText(['Text 3']);```java// ✓ Contains the right items in the right order-assertThat(page.locator("ul > li")).containsText(new String[] {"Text 1", "Text 3", "Text 4"});+assertThat(page.locator("ul > li")).containsText(new String[] {"Text 1", "Text 3"});// ✖ Wrong orderassertThat(page.locator("ul > li")).containsText(new String[] {"Text 3", "Text 2"});@@ -1232,7 +1232,7 @@ assertThat(page.locator("ul")).containsText(new String[] {"Text 3"});from playwright.async_api import expect# ✓ Contains the right items in the right order-await expect(page.locator("ul > li")).to_contain_text(["Text 1", "Text 3", "Text 4"])+await expect(page.locator("ul > li")).to_contain_text(["Text 1", "Text 3"])# ✖ Wrong orderawait expect(page.locator("ul > li")).to_contain_text(["Text 3", "Text 2"])@@ -1248,7 +1248,7 @@ await expect(page.locator("ul")).to_contain_text(["Text 3"])from playwright.sync_api import expect# ✓ Contains the right items in the right order-expect(page.locator("ul > li")).to_contain_text(["Text 1", "Text 3", "Text 4"])+expect(page.locator("ul > li")).to_contain_text(["Text 1", "Text 3"])# ✖ Wrong orderexpect(page.locator("ul > li")).to_contain_text(["Text 3", "Text 2"])@@ -1262,7 +1262,7 @@ expect(page.locator("ul")).to_contain_text(["Text 3"])```csharp// ✓ Contains the right items in the right order-await Expect(Page.Locator("ul > li")).ToContainTextAsync(new string[] {"Text 1", "Text 3", "Text 4"});+await Expect(Page.Locator("ul > li")).ToContainTextAsync(new string[] {"Text 1", "Text 3"});// ✖ Wrong orderawait Expect(Page.Locator("ul > li")).ToContainTextAsync(new string[] {"Text 3", "Text 2"});