Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs: fix locators visibility confusion

Pavel Feldman954de6250206
diff --git a/docs/src/api/class-frame.md b/docs/src/api/class-frame.md
index a1ba9b8fcc..11b7ac6051 100644
--- a/docs/src/api/class-frame.md
+++ b/docs/src/api/class-frame.md
@@ -937,8 +937,6 @@ Returns whether the element is [visible](./actionability.md#visible). [`option:
The method returns an element locator that can be used to perform actions in the frame.
Locator is resolved to the element immediately before performing an action, so a series of actions on the same locator can in fact be performed on different DOM elements. That would happen if the DOM structure between those actions has changed.
-Note that locator always implies visibility, so it will always be locating visible elements.
-
### param: Frame.locator.selector = %%-find-selector-%%
## method: Frame.name
diff --git a/docs/src/api/class-page.md b/docs/src/api/class-page.md
index e6ae6a2472..db83540ca5 100644
--- a/docs/src/api/class-page.md
+++ b/docs/src/api/class-page.md
@@ -2047,8 +2047,6 @@ Returns whether the element is [visible](./actionability.md#visible). [`option:
The method returns an element locator that can be used to perform actions on the page.
Locator is resolved to the element immediately before performing an action, so a series of actions on the same locator can in fact be performed on different DOM elements. That would happen if the DOM structure between those actions has changed.
-Note that locator always implies visibility, so it will always be locating visible elements.
-
Shortcut for main frame's [`method: Frame.locator`].
### param: Page.locator.selector = %%-find-selector-%%
diff --git a/types/types.d.ts b/types/types.d.ts
index 676f5a969b..aff44ebf0e 100644
--- a/types/types.d.ts
+++ b/types/types.d.ts
@@ -2070,8 +2070,6 @@ export interface Page {
* element immediately before performing an action, so a series of actions on the same locator can in fact be performed on
* different DOM elements. That would happen if the DOM structure between those actions has changed.
*
- * Note that locator always implies visibility, so it will always be locating visible elements.
- *
* Shortcut for main frame's [frame.locator(selector)](https://playwright.dev/docs/api/class-frame#frame-locator).
* @param selector A selector to use when resolving DOM element. See [working with selectors](https://playwright.dev/docs/selectors) for more details.
*/
@@ -4338,8 +4336,6 @@ export interface Frame {
* The method returns an element locator that can be used to perform actions in the frame. Locator is resolved to the
* element immediately before performing an action, so a series of actions on the same locator can in fact be performed on
* different DOM elements. That would happen if the DOM structure between those actions has changed.
- *
- * Note that locator always implies visibility, so it will always be locating visible elements.
* @param selector A selector to use when resolving DOM element. See [working with selectors](https://playwright.dev/docs/selectors) for more details.
*/
locator(selector: string): Locator;