Skip to content

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

docs: improve testing library migration docs for within (#37796)

Chris O'Donnelle6e65259f759
diff --git a/docs/src/testing-library-js.md b/docs/src/testing-library-js.md
index d7f7c05d82..bff0eb6162 100644
--- a/docs/src/testing-library-js.md
+++ b/docs/src/testing-library-js.md
@@ -119,7 +119,7 @@ You can create a locator inside another locator with [`method: Locator.locator`]
```js
// Testing Library
-const messages = document.getElementById('messages');
+const messages = screen.getByTestId('messages');
const helloMessage = within(messages).getByText('hello');
// Playwright