NOWAIT=1 to fail fast instead of waiting for user input
hitting ctrl-c 3x to abort is annoying...
This commit is contained in:
parent
9285b52017
commit
82d39d30b6
4 changed files with 5 additions and 1 deletions
|
|
@ -44,6 +44,7 @@ try {
|
|||
page.click('[aria-label="Cookies usage disclaimer banner"] button:has-text("Accept Cookies")').catch(_ => { }); // to not waste screen space when non-headless, TODO does not work reliably, need to wait for something else first?
|
||||
while (await page.locator('button:has-text("Sign in")').count() > 0) {
|
||||
console.error('Not signed in anymore.');
|
||||
if (cfg.nowait) process.exit(1);
|
||||
await page.click('button:has-text("Sign in")');
|
||||
if (!cfg.debug) context.setDefaultTimeout(cfg.login_timeout); // give user some extra time to log in
|
||||
console.info(`Login timeout is ${cfg.login_timeout / 1000} seconds!`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue