schickling/chromeless

Nodes Aren't Returned from an Eval

開放

#126 建立於 2017年8月1日

 (5 則留言) (0 個反應) (0 位負責人)TypeScript (606 個分叉)batch import
APIbugdiscussionenhancementhelp wanted

倉庫指標

星標
 (13,240 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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.

貢獻者指南