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

149
Views
Puppeteer selector for dynamically generated span attributes

I'm trying to get the text of a span on a Salesforce Lightning page, but on every page the span tag has different attributes.

The element i'm trying to select looks like this:

<span force-lookup_lookup="" data-proxy-id="aura-pos-lib-9" id="window">SFDC Admin</span>

So based on this the selector would be [data-proxy-id="aura-pos-lib-9"][id="window"]

However the same span in the same spot (visually speaking) on a different page is:

<span force-lookup_lookup="" data-proxy-id="aura-pos-lib-17" id="window">SFDC Admin</span>

Not to mention that [data-proxy-id="aura-pos-lib-9"][id="window"] might contain information from a completely different field on another page.

How can I select this dynamically changing element and save its contents (in this case SFDC Admin) to a variable?

Thank you in advance.

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!