As rightly suggested , please provide the minimal reproducible example.
However , to get you started : One of the core issue is, await page.locator().all()
returns an array of promises so If you directly iterate over jobs
, the locators resolve their properties asynchronously when accessed.
Instead of this:
const jobs = await page.locator('[data-testid="job-item-title"]').all();
I would suggest to use `.evaluateAll()` to directly fetch the job links instead of locators:
const jobs = await page.locator('[data-testid="job-item-title"]').evaluateAll(nodes => nodes.map(n => n.href));