Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs(locator): clarify Java List return types (#39910)

Yury Semikhatsky3fc762378353
diff --git a/docs/src/api/class-locator.md b/docs/src/api/class-locator.md
index e8eeed0841..ae53d6f49e 100644
--- a/docs/src/api/class-locator.md
+++ b/docs/src/api/class-locator.md
@@ -72,7 +72,7 @@ texts = page.get_by_role("link").all_inner_texts()
```
```java
-String[] texts = page.getByRole(AriaRole.LINK).allInnerTexts();
+List<String> texts = page.getByRole(AriaRole.LINK).allInnerTexts();
```
```csharp
@@ -104,7 +104,7 @@ texts = page.get_by_role("link").all_text_contents()
```
```java
-String[] texts = page.getByRole(AriaRole.LINK).allTextContents();
+List<String> texts = page.getByRole(AriaRole.LINK).allTextContents();
```
```csharp
diff --git a/docs/src/api/class-locatorassertions.md b/docs/src/api/class-locatorassertions.md
index 1dec8cf901..2ab9ba50ee 100644
--- a/docs/src/api/class-locatorassertions.md
+++ b/docs/src/api/class-locatorassertions.md
@@ -1104,7 +1104,7 @@ await expect(locator).toContainClass(['inactive', 'active', 'inactive']);
```
```java
-assertThat(page.locator(".list > .component")).containsClass(new String[] {"inactive", "active", "inactive"});
+assertThat(page.locator(".list > .component")).containsClass(Arrays.asList("inactive", "active", "inactive"));
```
```python async