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 har example (#23982)
Debbie O'Brien88010333f384
diff --git a/docs/src/mock.md b/docs/src/mock.mdindex 6d1e756268..563dd8e6bb 100644--- a/docs/src/mock.md+++ b/docs/src/mock.md@@ -242,6 +242,9 @@ test('records or updates the HAR file', async ({ page }) => {// Go to the pageawait page.goto('https://demo.playwright.dev/api-mocking');++ // Assert that the fruit is visible+ await expect(page.getByText('Strawberry')).toBeVisible();});```@@ -252,6 +255,9 @@ async def records_or_updates_the_har_file(page: Page):# Go to the pageawait page.goto("https://demo.playwright.dev/api-mocking")++ # Assert that the fruit is visible+ await expect(page.get_by_text("Strawberry")).to_be_visible()``````python sync@@ -261,6 +267,9 @@ def records_or_updates_the_har_file(page: Page):# Go to the pagepage.goto("https://demo.playwright.dev/api-mocking")++ # Assert that the fruit is visible+ expect(page.get_by_text("Strawberry")).to_be_visible()``````csharp@@ -272,6 +281,9 @@ await page.RouteFromHARAsync("./hars/fruit.har", new () {// Go to the pageawait page.GotoAsync("https://demo.playwright.dev/api-mocking");++// Assert that the fruit is visible+await Expect(page.GetByText("Strawberry")).ToBeVisibleAsync();``````java@@ -283,6 +295,9 @@ page.routeFromHAR("./hars/fruit.har", new RouteFromHAROptions()// Go to the pagepage.goto("https://demo.playwright.dev/api-mocking");++// Assert that the fruit is visible+assertThat(page.getByText("Strawberry")).isVisible();```### Modifying a HAR file