diff --git a/scripts/web-ctl.js b/scripts/web-ctl.js index ebcaf2a..3eda59a 100755 --- a/scripts/web-ctl.js +++ b/scripts/web-ctl.js @@ -950,7 +950,8 @@ async function runAction(sessionName, action, actionArgs, opts) { const url = actionArgs[0]; if (!url) throw new Error('URL required: run goto '); validateUrl(url); - const loadedTimeout = opts.timeout ? parseInt(opts.timeout, 10) : 15000; + const parsedTimeout = opts.timeout ? parseInt(opts.timeout, 10) : NaN; + const loadedTimeout = parsedTimeout > 0 ? parsedTimeout : 15000; const response = await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 30000 }); if (opts.ensureAuth || !opts.noAuthWallDetect) { const detection = await detectAuthWall(page, context, url);