Skip to content

Commit 20fb9ba

Browse files
DavertMikclaude
andcommitted
docs: remove React docs page, document react/vue locator removal in migration guide
- delete docs/react.md (page removed, dropped from sidebar) - migration-4.md: add 'React and Vue Locators removed' section recommending ARIA locators + resq removed from dependency table - locators.md / webdriver.md: drop /react links, point to ARIA locators Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 063b893 commit 20fb9ba

4 files changed

Lines changed: 27 additions & 94 deletions

File tree

docs/locators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ I.click({ role: 'button', name: 'Submit' }, '#login-form')
2222

2323
The context narrows the search to one region of the page, and the semantic string says what the user actually clicks. This is **more precise than ARIA or CSS alone** because it combines structural scope with human-readable intent.
2424

25-
Supported strategies: `css`, `xpath`, `id`, `name`, `role`, `frame`, `shadow`, `pw`. Shadow DOM has its own page — see [Shadow DOM](/shadow). Playwright-specific locators use the `pw` strategy: `{ pw: '[data-testid="save"]' }`. For testing React applications, see [Testing React Applications](/react).
25+
Supported strategies: `css`, `xpath`, `id`, `name`, `role`, `frame`, `shadow`, `pw`. Shadow DOM has its own page — see [Shadow DOM](/shadow). Playwright-specific locators use the `pw` strategy: `{ pw: '[data-testid="save"]' }`. To test components by their accessible role, use [ARIA locators](#aria-locators).
2626

2727
## Locator types at a glance
2828

docs/migration-4.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,30 @@ Use one of:
473473
474474
The `customLocators` strategy registration in Playwright config is removed. Use the `customLocator` plugin or built-in ARIA locators (`{ role: 'button', name: 'Submit' }`).
475475
476+
### React and Vue Locators removed
477+
478+
The `react` component locator and the bare-string `_react=`/`_vue=` Playwright selectors are removed from the Playwright, Puppeteer, and WebDriver helpers. The `resq` dependency is dropped.
479+
480+
```js
481+
// 3.x (removed)
482+
I.click({ react: 'SubmitButton' })
483+
I.seeElement({ react: 'Alert' })
484+
I.fillField({ react: 'EmailInput' }, 'a@b.com')
485+
```
486+
487+
They relied on `resq`, which is unmaintained, supports only React 16, reads React's private internal tree, and breaks under production minification. There is no working path for React 17, 18, or 19.
488+
489+
Use [ARIA locators](/locators#aria-locators) instead — they match how a user perceives the page and survive refactoring and minification:
490+
491+
```js
492+
// 4.x
493+
I.click({ role: 'button', name: 'Submit' })
494+
I.seeElement('[role=alert]')
495+
I.fillField('Email', 'a@b.com')
496+
```
497+
498+
For a component that renders no stable role, label, or text, add a `data-testid` in the JSX and locate by it: `I.click('[data-testid="submit"]')`.
499+
476500
### `I.retry()` and `I.limitTime()` removed
477501
478502
Both were deprecated in 3.x and are **removed in 4.x**. They configured the *next* step through a chained call; the replacement is the step options API — pass a `step.*` config as the **last argument** of the step itself.
@@ -688,6 +712,7 @@ If your project depends on these directly, check for breakage:
688712
| `testcafe` | 3.7.2 | **removed** |
689713
| `inquirer-test` | 2.0.1 | **removed** |
690714
| `joi` | 18 | **removed** — use `zod` |
715+
| `resq` | 1.11 | **removed** — `react`/`vue` locators dropped; use ARIA locators |
691716
| `zod` | — | added (^4) — schema validation in `JSONResponse` |
692717
| `tsx` | — | added as optional peer |
693718
| `@modelcontextprotocol/sdk` | — | added |

docs/react.md

Lines changed: 0 additions & 92 deletions
This file was deleted.

docs/webdriver.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ Scenario('create todo item', ({ I }) => {
285285
286286
> [▶ Working example of CodeceptJS WebDriver tests](https://github.com/DavertMik/codeceptjs-webdriver-example) for TodoMVC application.
287287
288-
WebDriver helper supports standard [CSS/XPath and text locators](/locators) as well as [Shadow DOM](/shadow). For testing React applications see [Testing React Applications](/react).
288+
WebDriver helper supports standard [CSS/XPath and text locators](/locators) as well as [Shadow DOM](/shadow) and [ARIA locators](/locators#aria-locators).
289289
290290
### Grabbers
291291

0 commit comments

Comments
 (0)