@xbrowser/cli 1.4.8 → 1.5.0
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.
- package/dist/{browser-4KKT6V5S.js → browser-2FJ4OO4H.js} +1 -1
- package/dist/{browser-MMIFKC36.js → browser-IS6DTR5Y.js} +2 -2
- package/dist/{browser-FKKMMB44.js → browser-ZFW2XADE.js} +2 -2
- package/dist/{cdp-driver-VFPOTO42.js → cdp-driver-MR6OG3YF.js} +34 -8
- package/dist/{cdp-driver-OY67R2KD.js → cdp-driver-QHTXQRQ2.js} +1 -1
- package/dist/{chunk-JGITVXIU.js → chunk-74QM55TC.js} +34 -8
- package/dist/{chunk-M4U63K6B.js → chunk-H7R352A2.js} +34 -8
- package/dist/{chunk-TP6RHIWG.js → chunk-MKEAO3XJ.js} +1 -1
- package/dist/{chunk-J7LDVYWI.js → chunk-WCM4FNUB.js} +1 -1
- package/dist/cli.js +59 -18
- package/dist/daemon-main.js +4 -4
- package/dist/index.js +60 -19
- package/dist/{session-replayer-JIH6H7WX.js → session-replayer-SD2MWGP5.js} +1 -1
- package/package.json +1 -1
|
@@ -20,8 +20,8 @@ import {
|
|
|
20
20
|
saveSessionDiskMeta,
|
|
21
21
|
setActivePage,
|
|
22
22
|
touchSession
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-WCM4FNUB.js";
|
|
24
|
+
import "./chunk-74QM55TC.js";
|
|
25
25
|
import "./chunk-TNEN6VQ2.js";
|
|
26
26
|
import "./chunk-GDKLH7ZY.js";
|
|
27
27
|
import "./chunk-KFQGP6VL.js";
|
|
@@ -20,8 +20,8 @@ import {
|
|
|
20
20
|
saveSessionDiskMeta,
|
|
21
21
|
setActivePage,
|
|
22
22
|
touchSession
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-MKEAO3XJ.js";
|
|
24
|
+
import "./chunk-74QM55TC.js";
|
|
25
25
|
import "./chunk-TNEN6VQ2.js";
|
|
26
26
|
import "./chunk-GDKLH7ZY.js";
|
|
27
27
|
import "./chunk-ABXMBNQ6.js";
|
|
@@ -1177,17 +1177,43 @@ var XBPageImpl = class _XBPageImpl {
|
|
|
1177
1177
|
headers: () => headers
|
|
1178
1178
|
};
|
|
1179
1179
|
}
|
|
1180
|
-
async goBack(
|
|
1181
|
-
|
|
1180
|
+
async goBack(opts = {}) {
|
|
1181
|
+
try {
|
|
1182
|
+
const navHistory = await this.conn.send("Page.getNavigationHistory", void 0, this.sessionId);
|
|
1183
|
+
if (navHistory.currentIndex > 0) {
|
|
1184
|
+
const prevUrl = navHistory.entries[navHistory.currentIndex - 1]?.url;
|
|
1185
|
+
if (prevUrl && prevUrl !== "about:blank") {
|
|
1186
|
+
await this.conn.send("Page.navigate", { url: prevUrl }, this.sessionId);
|
|
1187
|
+
await this.waitForLoadState(opts.waitUntil ?? "domcontentloaded", opts.timeout ?? 1e4).catch(() => {
|
|
1188
|
+
});
|
|
1189
|
+
this._url = prevUrl;
|
|
1190
|
+
return;
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
} catch {
|
|
1194
|
+
}
|
|
1182
1195
|
await this.evaluate("() => history.back()");
|
|
1183
|
-
await this.waitForTimeout(
|
|
1184
|
-
this._url = await this.evaluate("location.href").catch(() =>
|
|
1196
|
+
await this.waitForTimeout(3e3);
|
|
1197
|
+
this._url = await this.evaluate("location.href").catch(() => this._url);
|
|
1185
1198
|
}
|
|
1186
|
-
async goForward(
|
|
1187
|
-
|
|
1199
|
+
async goForward(opts = {}) {
|
|
1200
|
+
try {
|
|
1201
|
+
const navHistory = await this.conn.send("Page.getNavigationHistory", void 0, this.sessionId);
|
|
1202
|
+
if (navHistory.currentIndex < navHistory.entries.length - 1) {
|
|
1203
|
+
const nextUrl = navHistory.entries[navHistory.currentIndex + 1]?.url;
|
|
1204
|
+
if (nextUrl && nextUrl !== "about:blank") {
|
|
1205
|
+
await this.conn.send("Page.navigate", { url: nextUrl }, this.sessionId);
|
|
1206
|
+
await this.waitForLoadState(opts.waitUntil ?? "domcontentloaded", opts.timeout ?? 1e4).catch(() => {
|
|
1207
|
+
});
|
|
1208
|
+
this._url = nextUrl;
|
|
1209
|
+
return;
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
} catch {
|
|
1213
|
+
}
|
|
1188
1214
|
await this.evaluate("() => history.forward()");
|
|
1189
|
-
await this.waitForTimeout(
|
|
1190
|
-
this._url = await this.evaluate("location.href").catch(() =>
|
|
1215
|
+
await this.waitForTimeout(3e3);
|
|
1216
|
+
this._url = await this.evaluate("location.href").catch(() => this._url);
|
|
1191
1217
|
}
|
|
1192
1218
|
async reload(opts = {}) {
|
|
1193
1219
|
this._loadState = { loadFired: false, domContentFired: false, networkIdle: false };
|
|
@@ -1176,17 +1176,43 @@ var XBPageImpl = class _XBPageImpl {
|
|
|
1176
1176
|
headers: () => headers
|
|
1177
1177
|
};
|
|
1178
1178
|
}
|
|
1179
|
-
async goBack(
|
|
1180
|
-
|
|
1179
|
+
async goBack(opts = {}) {
|
|
1180
|
+
try {
|
|
1181
|
+
const navHistory = await this.conn.send("Page.getNavigationHistory", void 0, this.sessionId);
|
|
1182
|
+
if (navHistory.currentIndex > 0) {
|
|
1183
|
+
const prevUrl = navHistory.entries[navHistory.currentIndex - 1]?.url;
|
|
1184
|
+
if (prevUrl && prevUrl !== "about:blank") {
|
|
1185
|
+
await this.conn.send("Page.navigate", { url: prevUrl }, this.sessionId);
|
|
1186
|
+
await this.waitForLoadState(opts.waitUntil ?? "domcontentloaded", opts.timeout ?? 1e4).catch(() => {
|
|
1187
|
+
});
|
|
1188
|
+
this._url = prevUrl;
|
|
1189
|
+
return;
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
} catch {
|
|
1193
|
+
}
|
|
1181
1194
|
await this.evaluate("() => history.back()");
|
|
1182
|
-
await this.waitForTimeout(
|
|
1183
|
-
this._url = await this.evaluate("location.href").catch(() =>
|
|
1195
|
+
await this.waitForTimeout(3e3);
|
|
1196
|
+
this._url = await this.evaluate("location.href").catch(() => this._url);
|
|
1184
1197
|
}
|
|
1185
|
-
async goForward(
|
|
1186
|
-
|
|
1198
|
+
async goForward(opts = {}) {
|
|
1199
|
+
try {
|
|
1200
|
+
const navHistory = await this.conn.send("Page.getNavigationHistory", void 0, this.sessionId);
|
|
1201
|
+
if (navHistory.currentIndex < navHistory.entries.length - 1) {
|
|
1202
|
+
const nextUrl = navHistory.entries[navHistory.currentIndex + 1]?.url;
|
|
1203
|
+
if (nextUrl && nextUrl !== "about:blank") {
|
|
1204
|
+
await this.conn.send("Page.navigate", { url: nextUrl }, this.sessionId);
|
|
1205
|
+
await this.waitForLoadState(opts.waitUntil ?? "domcontentloaded", opts.timeout ?? 1e4).catch(() => {
|
|
1206
|
+
});
|
|
1207
|
+
this._url = nextUrl;
|
|
1208
|
+
return;
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
} catch {
|
|
1212
|
+
}
|
|
1187
1213
|
await this.evaluate("() => history.forward()");
|
|
1188
|
-
await this.waitForTimeout(
|
|
1189
|
-
this._url = await this.evaluate("location.href").catch(() =>
|
|
1214
|
+
await this.waitForTimeout(3e3);
|
|
1215
|
+
this._url = await this.evaluate("location.href").catch(() => this._url);
|
|
1190
1216
|
}
|
|
1191
1217
|
async reload(opts = {}) {
|
|
1192
1218
|
this._loadState = { loadFired: false, domContentFired: false, networkIdle: false };
|
|
@@ -1182,17 +1182,43 @@ var XBPageImpl = class _XBPageImpl {
|
|
|
1182
1182
|
headers: () => headers
|
|
1183
1183
|
};
|
|
1184
1184
|
}
|
|
1185
|
-
async goBack(
|
|
1186
|
-
|
|
1185
|
+
async goBack(opts = {}) {
|
|
1186
|
+
try {
|
|
1187
|
+
const navHistory = await this.conn.send("Page.getNavigationHistory", void 0, this.sessionId);
|
|
1188
|
+
if (navHistory.currentIndex > 0) {
|
|
1189
|
+
const prevUrl = navHistory.entries[navHistory.currentIndex - 1]?.url;
|
|
1190
|
+
if (prevUrl && prevUrl !== "about:blank") {
|
|
1191
|
+
await this.conn.send("Page.navigate", { url: prevUrl }, this.sessionId);
|
|
1192
|
+
await this.waitForLoadState(opts.waitUntil ?? "domcontentloaded", opts.timeout ?? 1e4).catch(() => {
|
|
1193
|
+
});
|
|
1194
|
+
this._url = prevUrl;
|
|
1195
|
+
return;
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
} catch {
|
|
1199
|
+
}
|
|
1187
1200
|
await this.evaluate("() => history.back()");
|
|
1188
|
-
await this.waitForTimeout(
|
|
1189
|
-
this._url = await this.evaluate("location.href").catch(() =>
|
|
1201
|
+
await this.waitForTimeout(3e3);
|
|
1202
|
+
this._url = await this.evaluate("location.href").catch(() => this._url);
|
|
1190
1203
|
}
|
|
1191
|
-
async goForward(
|
|
1192
|
-
|
|
1204
|
+
async goForward(opts = {}) {
|
|
1205
|
+
try {
|
|
1206
|
+
const navHistory = await this.conn.send("Page.getNavigationHistory", void 0, this.sessionId);
|
|
1207
|
+
if (navHistory.currentIndex < navHistory.entries.length - 1) {
|
|
1208
|
+
const nextUrl = navHistory.entries[navHistory.currentIndex + 1]?.url;
|
|
1209
|
+
if (nextUrl && nextUrl !== "about:blank") {
|
|
1210
|
+
await this.conn.send("Page.navigate", { url: nextUrl }, this.sessionId);
|
|
1211
|
+
await this.waitForLoadState(opts.waitUntil ?? "domcontentloaded", opts.timeout ?? 1e4).catch(() => {
|
|
1212
|
+
});
|
|
1213
|
+
this._url = nextUrl;
|
|
1214
|
+
return;
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
} catch {
|
|
1218
|
+
}
|
|
1193
1219
|
await this.evaluate("() => history.forward()");
|
|
1194
|
-
await this.waitForTimeout(
|
|
1195
|
-
this._url = await this.evaluate("location.href").catch(() =>
|
|
1220
|
+
await this.waitForTimeout(3e3);
|
|
1221
|
+
this._url = await this.evaluate("location.href").catch(() => this._url);
|
|
1196
1222
|
}
|
|
1197
1223
|
async reload(opts = {}) {
|
|
1198
1224
|
this._loadState = { loadFired: false, domContentFired: false, networkIdle: false };
|
package/dist/cli.js
CHANGED
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
resolveLaunchOpts,
|
|
26
26
|
saveSessionDiskMeta,
|
|
27
27
|
setActivePage
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-H7R352A2.js";
|
|
29
29
|
import "./chunk-TNEN6VQ2.js";
|
|
30
30
|
import {
|
|
31
31
|
forwardCommandLog,
|
|
@@ -7083,7 +7083,7 @@ async function executeCommand(commandName, params, sessionName = "default", extr
|
|
|
7083
7083
|
}
|
|
7084
7084
|
let targetPageOverride = null;
|
|
7085
7085
|
if (_target && extraOpts?.cdpEndpoint) {
|
|
7086
|
-
const { findTargetPage } = await import("./browser-
|
|
7086
|
+
const { findTargetPage } = await import("./browser-2FJ4OO4H.js");
|
|
7087
7087
|
targetPageOverride = await findTargetPage(extraOpts.cdpEndpoint, _target);
|
|
7088
7088
|
if (!targetPageOverride) {
|
|
7089
7089
|
return errorResult(`Target "${_target}" not found. Use 'xbrowser targets --cdp ${extraOpts.cdpEndpoint}' to list available pages.`);
|
|
@@ -11744,8 +11744,13 @@ Commands:
|
|
|
11744
11744
|
session close [--session <name>] Close session
|
|
11745
11745
|
session list List sessions
|
|
11746
11746
|
session kill [--session <name>] Kill session
|
|
11747
|
+
|
|
11747
11748
|
goto <url> Navigate to URL
|
|
11748
11749
|
open <url> Navigate to URL (alias for goto)
|
|
11750
|
+
back Go back in history
|
|
11751
|
+
forward Go forward in history
|
|
11752
|
+
refresh Reload page
|
|
11753
|
+
|
|
11749
11754
|
click <selector> Click element (-s <sel>)
|
|
11750
11755
|
fill <selector> <value> Fill input (-s <sel> -v <val>)
|
|
11751
11756
|
type <selector> <text> Type text (-s <sel> -v <text>)
|
|
@@ -11755,21 +11760,61 @@ Commands:
|
|
|
11755
11760
|
dblclick <selector> Double click (-s <sel>)
|
|
11756
11761
|
check <selector> Check checkbox (-s <sel>)
|
|
11757
11762
|
uncheck <selector> Uncheck checkbox (-s <sel>)
|
|
11758
|
-
|
|
11763
|
+
mouse <action> <x> <y> Mouse move/click at coordinates
|
|
11764
|
+
scroll <direction> [--distance N] Scroll page
|
|
11765
|
+
|
|
11766
|
+
screenshot [--full-page] [--base64] Take screenshot
|
|
11759
11767
|
eval <expression> Evaluate JS
|
|
11760
11768
|
wait <selector> [--timeout <ms>] Wait for element (-s <sel>)
|
|
11761
|
-
|
|
11769
|
+
waitForTimeout <ms> Wait for milliseconds
|
|
11770
|
+
waitFor --text <t> Wait for text/url/selector predicate
|
|
11762
11771
|
title Get page title
|
|
11763
11772
|
url Get current URL
|
|
11764
11773
|
html [--selector <sel>] Get HTML content
|
|
11765
11774
|
text [--selector <sel>] Get text content
|
|
11775
|
+
find <strategy> <value> [--action click|fill|hover] Find element by text/role/label
|
|
11776
|
+
|
|
11777
|
+
set-viewport <width> <height> Set viewport size
|
|
11778
|
+
frames List all frames
|
|
11779
|
+
frame --index <n> Switch to frame
|
|
11780
|
+
tab list List browser tabs
|
|
11781
|
+
tab new <url> Open new tab
|
|
11782
|
+
tab close --index <n> Close tab
|
|
11783
|
+
tab switch --index <n> Switch to tab
|
|
11784
|
+
|
|
11785
|
+
get-cookies Get all cookies
|
|
11786
|
+
set-cookie <name> <value> Set cookie
|
|
11787
|
+
clear-cookies Clear cookies
|
|
11788
|
+
get-local-storage Get localStorage
|
|
11789
|
+
set-local-storage <key> <value> Set localStorage item
|
|
11790
|
+
clear-local-storage Clear localStorage
|
|
11791
|
+
|
|
11792
|
+
snapshot Get page snapshot with element refs
|
|
11793
|
+
observe AI agent: observe page state
|
|
11794
|
+
act AI agent: perform action
|
|
11795
|
+
actions <url> --action "..." Execute action sequence
|
|
11796
|
+
|
|
11797
|
+
console Get console messages
|
|
11798
|
+
net-debug Get network debug info
|
|
11799
|
+
perf Get performance metrics
|
|
11800
|
+
health Run page health check (SEO/links/errors)
|
|
11801
|
+
structure Get page DOM structure
|
|
11802
|
+
network <url> Capture network traffic
|
|
11803
|
+
addinitscript <script> Add init script
|
|
11804
|
+
|
|
11805
|
+
scrape <url> Scrape page to markdown
|
|
11806
|
+
crawl <url> Crawl website (multi-page)
|
|
11807
|
+
search "query" Search the web (--engine, --limit, --full)
|
|
11808
|
+
map <url> Discover all URLs on a website
|
|
11809
|
+
|
|
11766
11810
|
convert <rec.yaml> <out.{js,py,sh}> Convert recording to script
|
|
11767
11811
|
extract <rec.yaml> Extract LLM-ready summary
|
|
11768
11812
|
filter <in.yaml> <out.yaml> Filter recording events
|
|
11769
|
-
|
|
11770
|
-
|
|
11771
|
-
|
|
11772
|
-
|
|
11813
|
+
replay <file> Replay recording
|
|
11814
|
+
record start --url <url> Start recording
|
|
11815
|
+
record stop Stop recording
|
|
11816
|
+
record status Recording status
|
|
11817
|
+
|
|
11773
11818
|
config <get|set|list> Manage config
|
|
11774
11819
|
plugin search <query> Search for plugins
|
|
11775
11820
|
plugin install <source> Install plugin
|
|
@@ -11777,16 +11822,12 @@ Commands:
|
|
|
11777
11822
|
plugin list List plugins
|
|
11778
11823
|
plugin reload <name> Reload plugin
|
|
11779
11824
|
create <name> --template <type> Create plugin
|
|
11780
|
-
serve [--port <port>] [--token <t>] Start HTTP server
|
|
11781
|
-
remote <url> [command] [--token <t>] Execute
|
|
11782
|
-
record start --url <url> Start recording
|
|
11783
|
-
record stop Stop recording
|
|
11784
|
-
record status Recording status
|
|
11785
|
-
replay <file> Replay recording
|
|
11825
|
+
serve [--port <port>] [--token <t>] Start HTTP server
|
|
11826
|
+
remote <url> [command] [--token <t>] Execute on remote server
|
|
11786
11827
|
run <file> Execute commands from file
|
|
11787
|
-
viewer [--name <n>]
|
|
11828
|
+
viewer [--name <n>] Generate viewer URL
|
|
11788
11829
|
help Show this help
|
|
11789
|
-
--version
|
|
11830
|
+
--version Show version
|
|
11790
11831
|
Plugin Commands:
|
|
11791
11832
|
Installed plugins provide additional commands.
|
|
11792
11833
|
Use 'xbrowser plugin list' to see installed plugins and their commands.
|
|
@@ -11832,7 +11873,7 @@ Global Flags:
|
|
|
11832
11873
|
--session <name> Use specific session
|
|
11833
11874
|
--cdp <endpoint> Connect via CDP (url, port, or 'auto')
|
|
11834
11875
|
--help, -h Show help
|
|
11835
|
-
|
|
11876
|
+
`);
|
|
11836
11877
|
}
|
|
11837
11878
|
|
|
11838
11879
|
// src/cli/chain-output.ts
|
|
@@ -13059,7 +13100,7 @@ async function main() {
|
|
|
13059
13100
|
const command = process.argv[2];
|
|
13060
13101
|
const isLongRunning = command === "preview" || command === "serve";
|
|
13061
13102
|
if (!isLongRunning) {
|
|
13062
|
-
const { ensureProcessCanExit } = await import("./browser-
|
|
13103
|
+
const { ensureProcessCanExit } = await import("./browser-2FJ4OO4H.js");
|
|
13063
13104
|
await ensureProcessCanExit().catch(() => {
|
|
13064
13105
|
});
|
|
13065
13106
|
process.exit(exitCode);
|
package/dist/daemon-main.js
CHANGED
|
@@ -21,8 +21,8 @@ import {
|
|
|
21
21
|
resolveLaunchOpts,
|
|
22
22
|
saveSessionDiskMeta,
|
|
23
23
|
setActivePage
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-WCM4FNUB.js";
|
|
25
|
+
import "./chunk-74QM55TC.js";
|
|
26
26
|
import "./chunk-TNEN6VQ2.js";
|
|
27
27
|
import {
|
|
28
28
|
getPluginLoader
|
|
@@ -6614,7 +6614,7 @@ async function executeCommand(commandName, params, sessionName = "default", extr
|
|
|
6614
6614
|
}
|
|
6615
6615
|
let targetPageOverride = null;
|
|
6616
6616
|
if (_target && extraOpts?.cdpEndpoint) {
|
|
6617
|
-
const { findTargetPage } = await import("./browser-
|
|
6617
|
+
const { findTargetPage } = await import("./browser-IS6DTR5Y.js");
|
|
6618
6618
|
targetPageOverride = await findTargetPage(extraOpts.cdpEndpoint, _target);
|
|
6619
6619
|
if (!targetPageOverride) {
|
|
6620
6620
|
return errorResult(`Target "${_target}" not found. Use 'xbrowser targets --cdp ${extraOpts.cdpEndpoint}' to list available pages.`);
|
|
@@ -8330,7 +8330,7 @@ function createRPCHandler() {
|
|
|
8330
8330
|
const isNewFormat = Array.isArray(parsed.actions);
|
|
8331
8331
|
if (isNewFormat) {
|
|
8332
8332
|
try {
|
|
8333
|
-
const { SessionReplayer } = await import("./session-replayer-
|
|
8333
|
+
const { SessionReplayer } = await import("./session-replayer-SD2MWGP5.js");
|
|
8334
8334
|
const replayer = new SessionReplayer({
|
|
8335
8335
|
page: session.page,
|
|
8336
8336
|
stepDelay: slowMo * 500,
|
package/dist/index.js
CHANGED
|
@@ -81,8 +81,8 @@ import {
|
|
|
81
81
|
resolveLaunchOpts,
|
|
82
82
|
saveSessionDiskMeta,
|
|
83
83
|
setActivePage
|
|
84
|
-
} from "./chunk-
|
|
85
|
-
import "./chunk-
|
|
84
|
+
} from "./chunk-MKEAO3XJ.js";
|
|
85
|
+
import "./chunk-74QM55TC.js";
|
|
86
86
|
import "./chunk-TNEN6VQ2.js";
|
|
87
87
|
import {
|
|
88
88
|
errMsg
|
|
@@ -7403,7 +7403,7 @@ async function executeCommand(commandName, params, sessionName = "default", extr
|
|
|
7403
7403
|
}
|
|
7404
7404
|
let targetPageOverride = null;
|
|
7405
7405
|
if (_target && extraOpts?.cdpEndpoint) {
|
|
7406
|
-
const { findTargetPage } = await import("./browser-
|
|
7406
|
+
const { findTargetPage } = await import("./browser-ZFW2XADE.js");
|
|
7407
7407
|
targetPageOverride = await findTargetPage(extraOpts.cdpEndpoint, _target);
|
|
7408
7408
|
if (!targetPageOverride) {
|
|
7409
7409
|
return errorResult(`Target "${_target}" not found. Use 'xbrowser targets --cdp ${extraOpts.cdpEndpoint}' to list available pages.`);
|
|
@@ -12084,8 +12084,13 @@ Commands:
|
|
|
12084
12084
|
session close [--session <name>] Close session
|
|
12085
12085
|
session list List sessions
|
|
12086
12086
|
session kill [--session <name>] Kill session
|
|
12087
|
+
|
|
12087
12088
|
goto <url> Navigate to URL
|
|
12088
12089
|
open <url> Navigate to URL (alias for goto)
|
|
12090
|
+
back Go back in history
|
|
12091
|
+
forward Go forward in history
|
|
12092
|
+
refresh Reload page
|
|
12093
|
+
|
|
12089
12094
|
click <selector> Click element (-s <sel>)
|
|
12090
12095
|
fill <selector> <value> Fill input (-s <sel> -v <val>)
|
|
12091
12096
|
type <selector> <text> Type text (-s <sel> -v <text>)
|
|
@@ -12095,21 +12100,61 @@ Commands:
|
|
|
12095
12100
|
dblclick <selector> Double click (-s <sel>)
|
|
12096
12101
|
check <selector> Check checkbox (-s <sel>)
|
|
12097
12102
|
uncheck <selector> Uncheck checkbox (-s <sel>)
|
|
12098
|
-
|
|
12103
|
+
mouse <action> <x> <y> Mouse move/click at coordinates
|
|
12104
|
+
scroll <direction> [--distance N] Scroll page
|
|
12105
|
+
|
|
12106
|
+
screenshot [--full-page] [--base64] Take screenshot
|
|
12099
12107
|
eval <expression> Evaluate JS
|
|
12100
12108
|
wait <selector> [--timeout <ms>] Wait for element (-s <sel>)
|
|
12101
|
-
|
|
12109
|
+
waitForTimeout <ms> Wait for milliseconds
|
|
12110
|
+
waitFor --text <t> Wait for text/url/selector predicate
|
|
12102
12111
|
title Get page title
|
|
12103
12112
|
url Get current URL
|
|
12104
12113
|
html [--selector <sel>] Get HTML content
|
|
12105
12114
|
text [--selector <sel>] Get text content
|
|
12115
|
+
find <strategy> <value> [--action click|fill|hover] Find element by text/role/label
|
|
12116
|
+
|
|
12117
|
+
set-viewport <width> <height> Set viewport size
|
|
12118
|
+
frames List all frames
|
|
12119
|
+
frame --index <n> Switch to frame
|
|
12120
|
+
tab list List browser tabs
|
|
12121
|
+
tab new <url> Open new tab
|
|
12122
|
+
tab close --index <n> Close tab
|
|
12123
|
+
tab switch --index <n> Switch to tab
|
|
12124
|
+
|
|
12125
|
+
get-cookies Get all cookies
|
|
12126
|
+
set-cookie <name> <value> Set cookie
|
|
12127
|
+
clear-cookies Clear cookies
|
|
12128
|
+
get-local-storage Get localStorage
|
|
12129
|
+
set-local-storage <key> <value> Set localStorage item
|
|
12130
|
+
clear-local-storage Clear localStorage
|
|
12131
|
+
|
|
12132
|
+
snapshot Get page snapshot with element refs
|
|
12133
|
+
observe AI agent: observe page state
|
|
12134
|
+
act AI agent: perform action
|
|
12135
|
+
actions <url> --action "..." Execute action sequence
|
|
12136
|
+
|
|
12137
|
+
console Get console messages
|
|
12138
|
+
net-debug Get network debug info
|
|
12139
|
+
perf Get performance metrics
|
|
12140
|
+
health Run page health check (SEO/links/errors)
|
|
12141
|
+
structure Get page DOM structure
|
|
12142
|
+
network <url> Capture network traffic
|
|
12143
|
+
addinitscript <script> Add init script
|
|
12144
|
+
|
|
12145
|
+
scrape <url> Scrape page to markdown
|
|
12146
|
+
crawl <url> Crawl website (multi-page)
|
|
12147
|
+
search "query" Search the web (--engine, --limit, --full)
|
|
12148
|
+
map <url> Discover all URLs on a website
|
|
12149
|
+
|
|
12106
12150
|
convert <rec.yaml> <out.{js,py,sh}> Convert recording to script
|
|
12107
12151
|
extract <rec.yaml> Extract LLM-ready summary
|
|
12108
12152
|
filter <in.yaml> <out.yaml> Filter recording events
|
|
12109
|
-
|
|
12110
|
-
|
|
12111
|
-
|
|
12112
|
-
|
|
12153
|
+
replay <file> Replay recording
|
|
12154
|
+
record start --url <url> Start recording
|
|
12155
|
+
record stop Stop recording
|
|
12156
|
+
record status Recording status
|
|
12157
|
+
|
|
12113
12158
|
config <get|set|list> Manage config
|
|
12114
12159
|
plugin search <query> Search for plugins
|
|
12115
12160
|
plugin install <source> Install plugin
|
|
@@ -12117,16 +12162,12 @@ Commands:
|
|
|
12117
12162
|
plugin list List plugins
|
|
12118
12163
|
plugin reload <name> Reload plugin
|
|
12119
12164
|
create <name> --template <type> Create plugin
|
|
12120
|
-
serve [--port <port>] [--token <t>] Start HTTP server
|
|
12121
|
-
remote <url> [command] [--token <t>] Execute
|
|
12122
|
-
record start --url <url> Start recording
|
|
12123
|
-
record stop Stop recording
|
|
12124
|
-
record status Recording status
|
|
12125
|
-
replay <file> Replay recording
|
|
12165
|
+
serve [--port <port>] [--token <t>] Start HTTP server
|
|
12166
|
+
remote <url> [command] [--token <t>] Execute on remote server
|
|
12126
12167
|
run <file> Execute commands from file
|
|
12127
|
-
viewer [--name <n>]
|
|
12168
|
+
viewer [--name <n>] Generate viewer URL
|
|
12128
12169
|
help Show this help
|
|
12129
|
-
--version
|
|
12170
|
+
--version Show version
|
|
12130
12171
|
Plugin Commands:
|
|
12131
12172
|
Installed plugins provide additional commands.
|
|
12132
12173
|
Use 'xbrowser plugin list' to see installed plugins and their commands.
|
|
@@ -12172,7 +12213,7 @@ Global Flags:
|
|
|
12172
12213
|
--session <name> Use specific session
|
|
12173
12214
|
--cdp <endpoint> Connect via CDP (url, port, or 'auto')
|
|
12174
12215
|
--help, -h Show help
|
|
12175
|
-
|
|
12216
|
+
`);
|
|
12176
12217
|
}
|
|
12177
12218
|
|
|
12178
12219
|
// src/cli/chain-output.ts
|
|
@@ -16186,7 +16227,7 @@ var DataCollector = class {
|
|
|
16186
16227
|
return results;
|
|
16187
16228
|
}
|
|
16188
16229
|
async createBrowserContext() {
|
|
16189
|
-
const { launch } = await import("./cdp-driver-
|
|
16230
|
+
const { launch } = await import("./cdp-driver-QHTXQRQ2.js");
|
|
16190
16231
|
const { browser } = await launch({
|
|
16191
16232
|
headless: true,
|
|
16192
16233
|
args: ["--no-sandbox", "--disable-setuid-sandbox"]
|
|
@@ -31,7 +31,7 @@ var SessionReplayer = class {
|
|
|
31
31
|
if (this.opts.page) {
|
|
32
32
|
this.page = this.opts.page;
|
|
33
33
|
} else if (this.opts.cdpUrl) {
|
|
34
|
-
const { launch } = await import("./cdp-driver-
|
|
34
|
+
const { launch } = await import("./cdp-driver-QHTXQRQ2.js");
|
|
35
35
|
const { browser } = await launch({ cdpEndpoint: this.opts.cdpUrl });
|
|
36
36
|
let contexts = browser.contexts();
|
|
37
37
|
for (let i = 0; i < 10 && contexts.length === 0; i++) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xbrowser/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Browser automation CLI for web scraping, headless browsing, SEO analysis, and AI agent workflows. A command-line alternative to Playwright, Puppeteer, and Selenium.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|