Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

128
Views
Java script pausing the script before the browser closes

Sorry im very new to coding so speak to me like a 5 year old lol but i wanted the script to pause before the browser closes for like 20 seconds, java script

      await page.goto('http://httpbin.org/ip');
      const infos = await create_accinfos(browser, page);
      write_log(true, "Complete infos");
      accounts.write(infos + "\n");
    } catch(e) {
      console.log(e);
    } finally {
      write_log(true, "Done");
      try{
        browser.close();
      } catch(e){};
    }
  })();
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can use setTimeout() method.

setTimeout(() => { browser.close(); }, 20000)

After 20 seconds (20 000 milliseconds) the browser will be closed.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!