mirror of
https://github.com/microsoft/playwright.git
synced 2024-10-27 05:46:28 +03:00
docs: Improve clarity on toHaveText and toContainText assertions (#28623)
This closes https://github.com/microsoft/playwright/issues/28058.
This commit is contained in:
parent
572e656be0
commit
6bd61cd8c6
@ -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**
|
||||
|
||||
|
8
packages/playwright/types/test.d.ts
vendored
8
packages/playwright/types/test.d.ts
vendored
@ -5655,8 +5655,8 @@ interface LocatorAssertions {
|
||||
}): Promise<void>;
|
||||
|
||||
/**
|
||||
* 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<void>;
|
||||
|
||||
/**
|
||||
* 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**
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user