mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-12 11:50:22 +03:00
docs: clarify that toBeHidden works when nothing matches (#17057)
This commit is contained in:
parent
74187290f1
commit
1dc2a33896
@ -645,7 +645,7 @@ await Expect(locator).ToBeFocusedAsync();
|
||||
* langs:
|
||||
- alias-java: isHidden
|
||||
|
||||
Ensures the [Locator] points to a hidden DOM node, which is the opposite of [visible](./actionability.md#visible).
|
||||
Ensures that [Locator] either does not resolve to any DOM node, or resolves to a [non-visible](./actionability.md#visible) one.
|
||||
|
||||
```js
|
||||
const locator = page.locator('.my-element');
|
||||
@ -686,7 +686,7 @@ await Expect(locator).ToBeHiddenAsync();
|
||||
* langs:
|
||||
- alias-java: isVisible
|
||||
|
||||
Ensures the [Locator] points to a [visible](./actionability.md#visible) DOM node.
|
||||
Ensures that [Locator] points to an [attached](./actionability.md#visible) and [visible](./actionability.md#visible) DOM node.
|
||||
|
||||
```js
|
||||
const locator = page.locator('.my-element');
|
||||
|
6
packages/playwright-test/types/test.d.ts
vendored
6
packages/playwright-test/types/test.d.ts
vendored
@ -3332,7 +3332,8 @@ interface LocatorAssertions {
|
||||
}): Promise<void>;
|
||||
|
||||
/**
|
||||
* Ensures the [Locator] points to a hidden DOM node, which is the opposite of [visible](https://playwright.dev/docs/api/actionability#visible).
|
||||
* Ensures that [Locator] either does not resolve to any DOM node, or resolves to a
|
||||
* [non-visible](https://playwright.dev/docs/api/actionability#visible) one.
|
||||
*
|
||||
* ```js
|
||||
* const locator = page.locator('.my-element');
|
||||
@ -3349,7 +3350,8 @@ interface LocatorAssertions {
|
||||
}): Promise<void>;
|
||||
|
||||
/**
|
||||
* Ensures the [Locator] points to a [visible](https://playwright.dev/docs/api/actionability#visible) DOM node.
|
||||
* Ensures that [Locator] points to an [attached](https://playwright.dev/docs/api/actionability#visible) and [visible](https://playwright.dev/docs/api/actionability#visible) DOM
|
||||
* node.
|
||||
*
|
||||
* ```js
|
||||
* const locator = page.locator('.my-element');
|
||||
|
Loading…
Reference in New Issue
Block a user