diff --git a/docs/src/api/class-locatorassertions.md b/docs/src/api/class-locatorassertions.md index abe90782b9..7322d15cbe 100644 --- a/docs/src/api/class-locatorassertions.md +++ b/docs/src/api/class-locatorassertions.md @@ -933,7 +933,7 @@ await Expect( * langs: - 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** @@ -1613,7 +1613,7 @@ Note that screenshot assertions only work with Playwright test runner. * langs: - 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** diff --git a/packages/playwright/types/test.d.ts b/packages/playwright/types/test.d.ts index a67ff6e121..2cd20a69d7 100644 --- a/packages/playwright/types/test.d.ts +++ b/packages/playwright/types/test.d.ts @@ -5655,8 +5655,8 @@ interface LocatorAssertions { }): Promise; /** - * Ensures the {@link Locator} points to an element that contains the given text. You can use regular expressions for - * the value as well. + * Ensures the {@link 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** * @@ -6069,8 +6069,8 @@ interface LocatorAssertions { }): Promise; /** - * Ensures the {@link Locator} points to an element with the given text. You can use regular expressions for the value - * as well. + * Ensures the {@link 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** *