playwright-repl 0.16.0 → 0.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +24 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -235,12 +235,36 @@ Short aliases are CLI-only.
235
235
  | `upload <ref> <file>` | — | Upload a file |
236
236
  | `drag <from> <to>` | — | Drag and drop |
237
237
 
238
+ ### Locator Flags
239
+
240
+ All text-based interaction commands support `--nth` and `--exact`:
241
+
242
+ | Flag | Description |
243
+ |------|-------------|
244
+ | `--nth <n>` | Select the nth visible match (0-indexed) |
245
+ | `--exact` | Exact text match only — skip the fallback chain |
246
+
247
+ ```
248
+ pw> click "Submit" --nth 0 # click the first "Submit"
249
+ pw> click "Submit" --exact # only exact text match, no fuzzy fallback
250
+ pw> fill "Email" "test" --exact # fill only if label is exactly "Email"
251
+ pw> highlight "npm" # show all matches (returns count)
252
+ → Highlighted 24 elements
253
+ pw> highlight "npm" --exact # only exact "npm", not "pnpm"
254
+ → Highlighted 2 elements
255
+ pw> highlight "npm" --nth 0 # highlight just the first match
256
+ → Highlighted 1 of 24
257
+ pw> highlight --clear # dismiss the highlight overlay
258
+ → Cleared
259
+ ```
260
+
238
261
  ### Inspection
239
262
 
240
263
  | Command | Alias | Description |
241
264
  |---------|-------|-------------|
242
265
  | `snapshot` | `s` | Accessibility tree with element refs |
243
266
  | `screenshot` | `ss` | Take a screenshot (saved to file) |
267
+ | `highlight <text\|selector>` | `hl` | Highlight matching elements on page |
244
268
  | `eval <expr>` | `e` | Evaluate JavaScript in browser context |
245
269
  | `console` | `con` | Browser console messages |
246
270
  | `network` | `net` | Network requests log |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright-repl",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "description": "Interactive REPL for Playwright browser automation — keyword-driven testing from your terminal",
5
5
  "type": "module",
6
6
  "bin": {