From ed97f1bfa4cfc22efbc6c24365eb163a70242d72 Mon Sep 17 00:00:00 2001 From: "microsoft-playwright-automation[bot]" <203992400+microsoft-playwright-automation[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 10:09:42 +0000 Subject: [PATCH] feat(roll): roll to ToT Playwright (12-05-25) --- dotnet/docs/api/class-locatorassertions.mdx | 6 +++--- java/docs/api/class-locatorassertions.mdx | 6 +++--- nodejs/docs/api/class-locatorassertions.mdx | 6 +++--- python/docs/api/class-locatorassertions.mdx | 10 +++++----- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dotnet/docs/api/class-locatorassertions.mdx b/dotnet/docs/api/class-locatorassertions.mdx index f6000fc0c63..5d69ecf63ff 100644 --- a/dotnet/docs/api/class-locatorassertions.mdx +++ b/dotnet/docs/api/class-locatorassertions.mdx @@ -324,7 +324,7 @@ await Expect(locator).ToContainClassAsync("row middle"); When an array is passed, the method asserts that the list of elements located matches the corresponding list of expected class lists. Each element's class attribute is matched against the corresponding class in the array: ```html -
+
@@ -332,7 +332,7 @@ When an array is passed, the method asserts that the list of elements located ma ``` ```csharp -var locator = Page.Locator("list > .component"); +var locator = Page.Locator(".list > .component"); await Expect(locator).ToContainClassAsync(new string[]{"inactive", "active", "inactive"}); ``` @@ -564,7 +564,7 @@ await Expect(locator).ToHaveClassAsync(new Regex("(^|\\s)selected(\\s|$)")); When an array is passed, the method asserts that the list of elements located matches the corresponding list of expected class values. Each element's class attribute is matched against the corresponding string or regular expression in the array: ```csharp -var locator = Page.Locator("list > .component"); +var locator = Page.Locator(".list > .component"); await Expect(locator).ToHaveClassAsync(new string[]{"component", "component selected", "component"}); ``` diff --git a/java/docs/api/class-locatorassertions.mdx b/java/docs/api/class-locatorassertions.mdx index dc266e6edff..53e31f6e3c4 100644 --- a/java/docs/api/class-locatorassertions.mdx +++ b/java/docs/api/class-locatorassertions.mdx @@ -50,7 +50,7 @@ assertThat(page.locator("#component")).containsClass("row middle"); When an array is passed, the method asserts that the list of elements located matches the corresponding list of expected class lists. Each element's class attribute is matched against the corresponding class in the array: ```html -
+
@@ -58,7 +58,7 @@ When an array is passed, the method asserts that the list of elements located ma ``` ```java -assertThat(page.locator("list > .component")).containsClass(new String[] {"inactive", "active", "inactive"}); +assertThat(page.locator(".list > .component")).containsClass(new String[] {"inactive", "active", "inactive"}); ``` **Arguments** @@ -285,7 +285,7 @@ assertThat(page.locator("#component")).hasClass(Pattern.compile("(^|\\s)selected When an array is passed, the method asserts that the list of elements located matches the corresponding list of expected class values. Each element's class attribute is matched against the corresponding string or regular expression in the array: ```java -assertThat(page.locator("list > .component")).hasClass(new String[] {"component", "component selected", "component"}); +assertThat(page.locator(".list > .component")).hasClass(new String[] {"component", "component selected", "component"}); ``` **Arguments** diff --git a/nodejs/docs/api/class-locatorassertions.mdx b/nodejs/docs/api/class-locatorassertions.mdx index 15103f22ea7..e23f2f82614 100644 --- a/nodejs/docs/api/class-locatorassertions.mdx +++ b/nodejs/docs/api/class-locatorassertions.mdx @@ -315,7 +315,7 @@ await expect(locator).toContainClass('row middle'); When an array is passed, the method asserts that the list of elements located matches the corresponding list of expected class lists. Each element's class attribute is matched against the corresponding class in the array: ```html -
+
@@ -323,7 +323,7 @@ When an array is passed, the method asserts that the list of elements located ma ``` ```js -const locator = page.locator('list > .component'); +const locator = page.locator('.list > .component'); await expect(locator).toContainClass(['inactive', 'active', 'inactive']); ``` @@ -589,7 +589,7 @@ await expect(locator).toHaveClass(/(^|\s)selected(\s|$)/); When an array is passed, the method asserts that the list of elements located matches the corresponding list of expected class values. Each element's class attribute is matched against the corresponding string or regular expression in the array: ```js -const locator = page.locator('list > .component'); +const locator = page.locator('.list > .component'); await expect(locator).toHaveClass(['component', 'component selected', 'component']); ``` diff --git a/python/docs/api/class-locatorassertions.mdx b/python/docs/api/class-locatorassertions.mdx index 0a327964516..038085b15ca 100644 --- a/python/docs/api/class-locatorassertions.mdx +++ b/python/docs/api/class-locatorassertions.mdx @@ -1294,7 +1294,7 @@ await expect(locator).to_contain_class("row middle") When an array is passed, the method asserts that the list of elements located matches the corresponding list of expected class lists. Each element's class attribute is matched against the corresponding class in the array: ```html -
+
@@ -1314,7 +1314,7 @@ When an array is passed, the method asserts that the list of elements located ma ```py from playwright.sync_api import expect -locator = page.locator("list > .component") +locator = page.locator(".list > .component") await expect(locator).to_contain_class(["inactive", "active", "inactive"]) ``` @@ -1324,7 +1324,7 @@ await expect(locator).to_contain_class(["inactive", "active", "inactive"]) ```py from playwright.async_api import expect -locator = page.locator("list > .component") +locator = page.locator(".list > .component") await expect(locator).to_contain_class(["inactive", "active", "inactive"]) ``` @@ -1741,7 +1741,7 @@ When an array is passed, the method asserts that the list of elements located ma ```py from playwright.sync_api import expect -locator = page.locator("list > .component") +locator = page.locator(".list > .component") expect(locator).to_have_class(["component", "component selected", "component"]) ``` @@ -1751,7 +1751,7 @@ expect(locator).to_have_class(["component", "component selected", "component"]) ```py from playwright.async_api import expect -locator = page.locator("list > .component") +locator = page.locator(".list > .component") await expect(locator).to_have_class(["component", "component selected", "component"]) ```