mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
docs: Soft expect example + tobeAttached (#23475)
This commit is contained in:
parent
93e6a2f679
commit
5e0195f7c4
@ -24,6 +24,7 @@ By default, the timeout for assertions is set to 5 seconds. Learn more about [va
|
|||||||
|
|
||||||
| Assertion | Description |
|
| Assertion | Description |
|
||||||
| :- | :- |
|
| :- | :- |
|
||||||
|
| [`method: LocatorAssertions.toBeAttached`] | Element is attached |
|
||||||
| [`method: LocatorAssertions.toBeChecked`] | Checkbox is checked |
|
| [`method: LocatorAssertions.toBeChecked`] | Checkbox is checked |
|
||||||
| [`method: LocatorAssertions.toBeDisabled`] | Element is disabled |
|
| [`method: LocatorAssertions.toBeDisabled`] | Element is disabled |
|
||||||
| [`method: LocatorAssertions.toBeEditable`] | Element is editable |
|
| [`method: LocatorAssertions.toBeEditable`] | Element is editable |
|
||||||
@ -132,6 +133,7 @@ await slowExpect(locator).toHaveText('Submit');
|
|||||||
|
|
||||||
// Always do soft assertions.
|
// Always do soft assertions.
|
||||||
const softExpect = expect.configure({ soft: true });
|
const softExpect = expect.configure({ soft: true });
|
||||||
|
await softExpect(locator).toHaveText('Submit');
|
||||||
```
|
```
|
||||||
|
|
||||||
## expect.poll
|
## expect.poll
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user