docs(assertions): note on whitespace normalization (#28110)

Fixes https://github.com/microsoft/playwright-java/issues/1419
This commit is contained in:
Yury Semikhatsky 2023-11-13 12:28:50 -08:00 committed by GitHub
parent cd70d51aa8
commit 35aeace476
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View File

@ -929,6 +929,11 @@ await Expect(
Ensures the [Locator] points to an element that contains the given text. You can use regular expressions for the value as well.
**Details**
When `expected` parameter is a string, Playwright will normalize whitespaces and line breaks both in the actual text and
in the expected string before matching. When regular expression is used, the actual text is matched as is.
**Usage**
```js
@ -1598,6 +1603,11 @@ Note that screenshot assertions only work with Playwright test runner.
Ensures the [Locator] points to an element with the given text. You can use regular expressions for the value as well.
**Details**
When `expected` parameter is a string, Playwright will normalize whitespaces and line breaks both in the actual text and
in the expected string before matching. When regular expression is used, the actual text is matched as is.
**Usage**
```js

View File

@ -5632,6 +5632,11 @@ interface LocatorAssertions {
* Ensures the {@link Locator} points to an element that contains the given text. You can use regular expressions for
* the value as well.
*
* **Details**
*
* When `expected` parameter is a string, Playwright will normalize whitespaces and line breaks both in the actual
* text and in the expected string before matching. When regular expression is used, the actual text is matched as is.
*
* **Usage**
*
* ```js
@ -6029,6 +6034,11 @@ interface LocatorAssertions {
* Ensures the {@link Locator} points to an element with the given text. You can use regular expressions for the value
* as well.
*
* **Details**
*
* When `expected` parameter is a string, Playwright will normalize whitespaces and line breaks both in the actual
* text and in the expected string before matching. When regular expression is used, the actual text is matched as is.
*
* **Usage**
*
* ```js