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

275
Views
How can I use session storage in a Puppeteer script?

I am trying to collect the encounter id from a Puppeteer script that opens a browser. I run these scripts in AWS synthetic canaries. It does not run, the error reads:

sessionStorage is not defined Stack

This is the code I use

let data = sessionStorage.getItem('aw-encounter-id');
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The browser (Puppeteer) needs to support sessionStorage. This article may help:

https://newbedev.com/puppeteer-how-to-store-a-session-including-cookies-page-state-local-storage-etc-and-continue-later

According to that, it might work if you initialize passing a data dir:

   puppeteer.launch({userDataDir: '/tmp/myChromeSession'});
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!