@oomfware/cbr 0.1.0 → 0.1.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.
|
@@ -19,12 +19,12 @@ Run commands with `browser <command> [args...] [--flags]`.
|
|
|
19
19
|
|
|
20
20
|
- `browser snapshot` — get the accessibility tree with element refs (`@e1`, `@e2`, ...)
|
|
21
21
|
- `--interactive` — only show interactive elements (buttons, links, inputs, etc.)
|
|
22
|
-
- `--compact` — strip
|
|
22
|
+
- `--compact` — strip unnamed structural elements and prune empty branches
|
|
23
23
|
- `--depth <n>` — limit tree depth
|
|
24
|
-
- `--selector <css>` — scope to a
|
|
24
|
+
- `--selector <css>` — scope to a subtree via CSS selector
|
|
25
25
|
- `browser screenshot [name]` — take a screenshot, saved to `screenshots/[name].png`. read the file
|
|
26
26
|
to view it.
|
|
27
|
-
- `--full` — capture full page
|
|
27
|
+
- `--full` — capture the full scrollable page
|
|
28
28
|
- `browser get url` / `browser get title` — page info
|
|
29
29
|
- `browser get text <sel>` / `browser get html <sel>` / `browser get value <sel>` — element content
|
|
30
30
|
- `browser get attr <sel> <attr>` — element attribute
|
|
@@ -46,11 +46,14 @@ Run commands with `browser <command> [args...] [--flags]`.
|
|
|
46
46
|
|
|
47
47
|
**Waiting** (default timeout: 5s):
|
|
48
48
|
|
|
49
|
-
- `browser wait for <sel>` — wait for an element to
|
|
50
|
-
- `
|
|
49
|
+
- `browser wait for <sel>` — wait for an element to appear
|
|
50
|
+
- `--hidden` — wait for the element to disappear instead
|
|
51
|
+
- `--timeout <ms>` — override the default timeout
|
|
52
|
+
- `browser wait for-text "..."` — wait for text content to appear on the page
|
|
53
|
+
- `--hidden` — wait for the text to disappear instead
|
|
54
|
+
- `--timeout <ms>` — override the default timeout
|
|
51
55
|
- `browser wait for-url "..."` — wait for the URL to match a pattern
|
|
52
|
-
- `--
|
|
53
|
-
- `--timeout <ms>` — override the default 5s timeout
|
|
56
|
+
- `--timeout <ms>` — override the default timeout
|
|
54
57
|
|
|
55
58
|
**Scrolling:**
|
|
56
59
|
|
package/dist/index.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import * as v from "valibot";
|
|
|
13
13
|
import { createServer } from "node:net";
|
|
14
14
|
|
|
15
15
|
//#region package.json
|
|
16
|
-
var version = "0.1.
|
|
16
|
+
var version = "0.1.1";
|
|
17
17
|
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/lib/commands/_types.ts
|
|
@@ -627,7 +627,7 @@ const handler$9 = async (state, args) => {
|
|
|
627
627
|
const schema$8 = object({
|
|
628
628
|
command: constant("snapshot"),
|
|
629
629
|
interactive: withDefault(option("--interactive", { description: message`only show interactive elements` }), false),
|
|
630
|
-
compact: withDefault(option("--compact", { description: message`
|
|
630
|
+
compact: withDefault(option("--compact", { description: message`strip unnamed structural elements and prune empty branches` }), false),
|
|
631
631
|
depth: optional(option("--depth", integer({ min: 0 }), { description: message`maximum tree depth` })),
|
|
632
632
|
selector: optional(option("--selector", string(), { description: message`scope to a subtree` }))
|
|
633
633
|
});
|
package/package.json
CHANGED
|
@@ -19,12 +19,12 @@ Run commands with `browser <command> [args...] [--flags]`.
|
|
|
19
19
|
|
|
20
20
|
- `browser snapshot` — get the accessibility tree with element refs (`@e1`, `@e2`, ...)
|
|
21
21
|
- `--interactive` — only show interactive elements (buttons, links, inputs, etc.)
|
|
22
|
-
- `--compact` — strip
|
|
22
|
+
- `--compact` — strip unnamed structural elements and prune empty branches
|
|
23
23
|
- `--depth <n>` — limit tree depth
|
|
24
|
-
- `--selector <css>` — scope to a
|
|
24
|
+
- `--selector <css>` — scope to a subtree via CSS selector
|
|
25
25
|
- `browser screenshot [name]` — take a screenshot, saved to `screenshots/[name].png`. read the file
|
|
26
26
|
to view it.
|
|
27
|
-
- `--full` — capture full page
|
|
27
|
+
- `--full` — capture the full scrollable page
|
|
28
28
|
- `browser get url` / `browser get title` — page info
|
|
29
29
|
- `browser get text <sel>` / `browser get html <sel>` / `browser get value <sel>` — element content
|
|
30
30
|
- `browser get attr <sel> <attr>` — element attribute
|
|
@@ -46,11 +46,14 @@ Run commands with `browser <command> [args...] [--flags]`.
|
|
|
46
46
|
|
|
47
47
|
**Waiting** (default timeout: 5s):
|
|
48
48
|
|
|
49
|
-
- `browser wait for <sel>` — wait for an element to
|
|
50
|
-
- `
|
|
49
|
+
- `browser wait for <sel>` — wait for an element to appear
|
|
50
|
+
- `--hidden` — wait for the element to disappear instead
|
|
51
|
+
- `--timeout <ms>` — override the default timeout
|
|
52
|
+
- `browser wait for-text "..."` — wait for text content to appear on the page
|
|
53
|
+
- `--hidden` — wait for the text to disappear instead
|
|
54
|
+
- `--timeout <ms>` — override the default timeout
|
|
51
55
|
- `browser wait for-url "..."` — wait for the URL to match a pattern
|
|
52
|
-
- `--
|
|
53
|
-
- `--timeout <ms>` — override the default 5s timeout
|
|
56
|
+
- `--timeout <ms>` — override the default timeout
|
|
54
57
|
|
|
55
58
|
**Scrolling:**
|
|
56
59
|
|
|
@@ -11,7 +11,10 @@ export const schema = object({
|
|
|
11
11
|
option('--interactive', { description: message`only show interactive elements` }),
|
|
12
12
|
false,
|
|
13
13
|
),
|
|
14
|
-
compact: withDefault(
|
|
14
|
+
compact: withDefault(
|
|
15
|
+
option('--compact', { description: message`strip unnamed structural elements and prune empty branches` }),
|
|
16
|
+
false,
|
|
17
|
+
),
|
|
15
18
|
depth: optional(option('--depth', integer({ min: 0 }), { description: message`maximum tree depth` })),
|
|
16
19
|
selector: optional(option('--selector', string(), { description: message`scope to a subtree` })),
|
|
17
20
|
});
|