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

268
Views
Using puppeteer to access react event handlers

I am trying to use puppeteer to access properties of an element. Specifically I need the key or listingId from the react event handler object

__reactEventHandlers$(the rest is dynamically generated) > children[0] > key

screenshot from devtools on page properties tab on element .RoyalTicketList__container

So far await page.$(".RoyalTicketListPanel"); or await page.$(".RoyalTicketListPanel__0"); the first being a ul element and the second being the first list item, returns a lot of data for the element, but not the event handler object.
I've tried

await page.evaluate((selector) => {
    return document.querySelector(selector);
}, selector);

as well and it just returns undefined.
Someone posted a similar question here How to access React Event Handlers with Puppeteer
But the answer also returns undefined in my case.
I'm stumped at this point, if anyone can help me out with this it would be greatly appreciated.
Also, if anyone wants to try to recreate what I'm doing, I'm using puppeteer to go to an event on stubhub then trying to get the ticket's listing ids from the ticket list.

about 4 years ago · Juan Pablo Isaza
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!