cbrowser 18.23.0 → 18.24.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/cli.js CHANGED
@@ -65,6 +65,7 @@ function showHelp() {
65
65
  NAVIGATION
66
66
  navigate <url> Navigate and take screenshot
67
67
  screenshot [path] Take screenshot of current page
68
+ --no-restore Don't reload saved URL (capture current state after interactions)
68
69
 
69
70
  INTERACTION
70
71
  click <selector> Click element (tries text, label, role, CSS)
@@ -643,6 +644,7 @@ OPTIONS
643
644
  --force Bypass red zone safety checks
644
645
  --headless Run browser in headless mode
645
646
  --no-persistent Disable persistent browser context (default: enabled)
647
+ --no-restore Skip session URL restoration (preserves page state after interactions)
646
648
 
647
649
  ENVIRONMENT VARIABLES
648
650
  CBROWSER_DATA_DIR Custom data directory (default: ~/.cbrowser)
@@ -1332,6 +1334,8 @@ Documentation: https://github.com/alexandriashai/cbrowser/wiki
1332
1334
  }
1333
1335
  // Default to headless for CLI usage, unless explicitly set to false
1334
1336
  const headless = options.headless !== false && options.headless !== "false";
1337
+ // --no-restore: skip session URL restoration (preserves page state after interactions)
1338
+ const skipRestore = options.restore === false || options.restore === "false";
1335
1339
  const browser = new CBrowser({
1336
1340
  browser: browserType,
1337
1341
  headless,
@@ -1341,6 +1345,7 @@ Documentation: https://github.com/alexandriashai/cbrowser/wiki
1341
1345
  timezone: options.timezone,
1342
1346
  recordVideo: options["record-video"] === true,
1343
1347
  persistent: persistentMode,
1348
+ skipSessionRestore: skipRestore,
1344
1349
  verbose: true,
1345
1350
  });
1346
1351
  try {