Skip to content

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

docs(assertions): fix wrong toHaveText param description (#19213)

Max Schmitt62b28c89b48a
diff --git a/docs/src/api/class-locatorassertions.md b/docs/src/api/class-locatorassertions.md
index b46f5c9405..f7c5e7a2fa 100644
--- a/docs/src/api/class-locatorassertions.md
+++ b/docs/src/api/class-locatorassertions.md
@@ -360,7 +360,7 @@ The opposite of [`method: LocatorAssertions.toHaveText`].
* since: v1.18
- `expected` <[string]|[RegExp]|[Array]<[string]>|[Array]<[RegExp]>|[Array]<[string]|[RegExp]>>
-Expected substring or RegExp or a list of those.
+Expected string or RegExp or a list of those.
### option: LocatorAssertions.NotToHaveText.ignoreCase
* since: v1.23
@@ -1554,21 +1554,21 @@ await Expect(Page.Locator("ul")).ToHaveTextAsync(new string[] {"Text 1", "Text 2
* langs: js
- `expected` <[string]|[RegExp]|[Array]<[string]|[RegExp]>>
-Expected substring or RegExp or a list of those.
+Expected string or RegExp or a list of those.
### param: LocatorAssertions.toHaveText.expected
* since: v1.18
* langs: python
- `expected` <[string]|[RegExp]|[Array]<[string]>|[Array]<[RegExp]>|[Array]<[string]|[RegExp]>>
-Expected substring or RegExp or a list of those.
+Expected string or RegExp or a list of those.
### param: LocatorAssertions.toHaveText.expected
* since: v1.18
* langs: java, csharp
- `expected` <[string]|[RegExp]|[Array]<[string]>|[Array]<[RegExp]>>
-Expected substring or RegExp or a list of those.
+Expected string or RegExp or a list of those.
### option: LocatorAssertions.toHaveText.ignoreCase
* since: v1.23
diff --git a/packages/playwright-test/types/test.d.ts b/packages/playwright-test/types/test.d.ts
index b1c3a764e2..956d8afc61 100644
--- a/packages/playwright-test/types/test.d.ts
+++ b/packages/playwright-test/types/test.d.ts
@@ -4011,7 +4011,7 @@ interface LocatorAssertions {
* await expect(page.locator('ul')).toHaveText(['Text 1', 'Text 2', 'Text 3']);
* ```
*
- * @param expected Expected substring or RegExp or a list of those.
+ * @param expected Expected string or RegExp or a list of those.
* @param options
*/
toHaveText(expected: string|RegExp|Array<string|RegExp>, options?: {