Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dotnet/docs/api/class-locatorassertions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -324,15 +324,15 @@ 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
<div class='list'></div>
<div class='list'>
<div class='component inactive'></div>
<div class='component active'></div>
<div class='component inactive'></div>
</div>
```

```csharp
var locator = Page.Locator("list > .component");
var locator = Page.Locator(".list > .component");
await Expect(locator).ToContainClassAsync(new string[]{"inactive", "active", "inactive"});
```

Expand Down Expand Up @@ -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"});
```

Expand Down
6 changes: 3 additions & 3 deletions java/docs/api/class-locatorassertions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ 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
<div class='list'></div>
<div class='list'>
<div class='component inactive'></div>
<div class='component active'></div>
<div class='component inactive'></div>
</div>
```

```java
assertThat(page.locator("list > .component")).containsClass(new String[] {"inactive", "active", "inactive"});
assertThat(page.locator(".list > .component")).containsClass(new String[] {"inactive", "active", "inactive"});
```

**Arguments**
Expand Down Expand Up @@ -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**
Expand Down
6 changes: 3 additions & 3 deletions nodejs/docs/api/class-locatorassertions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -315,15 +315,15 @@ 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
<div class='list'></div>
<div class='list'>
<div class='component inactive'></div>
<div class='component active'></div>
<div class='component inactive'></div>
</div>
```

```js
const locator = page.locator('list > .component');
const locator = page.locator('.list > .component');
await expect(locator).toContainClass(['inactive', 'active', 'inactive']);
```

Expand Down Expand Up @@ -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']);
```

Expand Down
10 changes: 5 additions & 5 deletions python/docs/api/class-locatorassertions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
<div class='list'></div>
<div class='list'>
<div class='component inactive'></div>
<div class='component active'></div>
<div class='component inactive'></div>
Expand All @@ -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"])
```

Expand All @@ -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"])
```

Expand Down Expand Up @@ -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"])
```

Expand All @@ -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"])
```

Expand Down
Loading