mirror of
https://github.com/microsoft/playwright.git
synced 2024-10-27 05:46:28 +03:00
docs(assertions): note on whitespace normalization (#28110)
Fixes https://github.com/microsoft/playwright-java/issues/1419
This commit is contained in:
parent
cd70d51aa8
commit
35aeace476
@ -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
|
||||
|
10
packages/playwright/types/test.d.ts
vendored
10
packages/playwright/types/test.d.ts
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user