schickling/chromeless

Nodes Aren't Returned from an Eval

Open

#126 aperta il 1 ago 2017

Vedi su GitHub
 (5 commenti) (0 reazioni) (0 assegnatari)TypeScript (606 fork)batch import
APIbugdiscussionenhancementhelp wanted

Metriche repository

Star
 (13.240 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Running the following in the chromeless playground demo:

const chromeless = new Chromeless({ remote: true })

const nodes = await chromeless
  .goto('https://www.google.com')
  .evaluate(() => {
    // this will be executed in Chrome
    return [...document.querySelectorAll('a')]
  })

console.log(nodes)

await chromeless.end()

...produces no discernible return value according to the UI. Running the same [...document.querySelectorAll('a')] within Chrome Devtools will return an array populated by nodes as one would expect.

Not sure where to begin debugging this, but wanted to raise the yellow flag on the issue.

Guida contributor