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

77
Views
Javascript - Document Query Selector

I am trying to select the job posting titles and the href for the job postings. Then return response. Can you tell me what I am doing wrong here?

Website: https://epyz.fa.us2.oraclecloud.com/hcmUI/CandidateExperience/en/sites/CX_1/requisitions?location=Jacksonville,%20FL,%20United%20States&locationId=300000002870977&locationLevel=city&mode=location&radius=25&radiusUnit=MI

Here is my last attempt:

  function ExecuteScript() {
    let response = '';
    document.querySelectorAll('h2[data-bind="text: job.title"]').forEach((element, i) => {
      response += element.innerHTML + '\\t' + location.host + element.getAttribute('href') + '\\n';
    });
    return response;
  }

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

First of all, inspect how page structure looks like: each list element (job post) is list item (li) with full-size link (a) inside it. Also each item contain h2 header that represent post title:

li -> a
   -> div -> h2

So to grab both title and link you can iterate through list items and search for target children elements:

Array.from(document.querySelectorAll('li.job-tile')).map(element => ({
 title: element.querySelector('h2.job-tile__title').innerText,
 link: element.querySelector('a.job-tile__show').href
}))

Where

li.job-tile        - list item, post tile actually
h2.job-tile__title - header, post title
a.job-tile__show   - link, post page URL

This snippet will return array of objects with title & links like this:

[
  {
    title: 'Application Engineer (Custom Solutions)', 
    link: 'https://epyz.fa.us2.oraclecloud.com/hcmUI/Candidat…nLevel=city&mode=location&radius=25&radiusUnit=MI'
  },
  {
     title: 'Intern - Custom Solutions (Information Systems)', 
     link: 'https://epyz.fa.us2.oraclecloud.com/hcmUI/Candidat…nLevel=city&mode=location&radius=25&radiusUnit=MI'
  },
  ...
]

Also should be noticed that feed you provided contains paggination (as infinite scroll) so grabbing methods like this one will parse only visible posts (loaded), not all of them.

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!