docs: Improve clarity on toHaveText and toContainText assertions (#28623)

This closes https://github.com/microsoft/playwright/issues/28058.
This commit is contained in:
geke-scottlogic 2024-01-05 17:20:50 +00:00 committed by GitHub
parent 572e656be0
commit 6bd61cd8c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -933,7 +933,7 @@ await Expect(
* langs: * langs:
- alias-java: containsText - alias-java: containsText
Ensures the [Locator] points to an element that contains the given text. You can use regular expressions for the value as well. Ensures the [Locator] points to an element that contains the given text. All nested elements will be considered when computing the text content of the element. You can use regular expressions for the value as well.
**Details** **Details**
@ -1613,7 +1613,7 @@ Note that screenshot assertions only work with Playwright test runner.
* langs: * langs:
- alias-java: hasText - alias-java: hasText
Ensures the [Locator] points to an element with the given text. You can use regular expressions for the value as well. Ensures the [Locator] points to an element with the given text. All nested elements will be considered when computing the text content of the element. You can use regular expressions for the value as well.
**Details** **Details**

View File

@ -5655,8 +5655,8 @@ interface LocatorAssertions {
}): Promise<void>; }): Promise<void>;
/** /**
* Ensures the {@link Locator} points to an element that contains the given text. You can use regular expressions for * Ensures the {@link Locator} points to an element that contains the given text. All nested elements will be
* the value as well. * considered when computing the text content of the element. You can use regular expressions for the value as well.
* *
* **Details** * **Details**
* *
@ -6069,8 +6069,8 @@ interface LocatorAssertions {
}): Promise<void>; }): Promise<void>;
/** /**
* Ensures the {@link Locator} points to an element with the given text. You can use regular expressions for the value * Ensures the {@link Locator} points to an element with the given text. All nested elements will be considered when
* as well. * computing the text content of the element. You can use regular expressions for the value as well.
* *
* **Details** * **Details**
* *