Tag: chromeless

节点:在文件夹上运行无铬自动化

我试图在我的testing文件夹中的所有文件上运行chromeless 这是我的index.js到目前为止 const {spawn} = require('child_process'); let fs = require('fs'); const proc = spawn('chrome', [ '–remote-debugging-port=9222', '–disable-gpu', '–headless' ]); console.log(`Spawned child pid: ${proc.pid}`); async function run() { let path = __dirname; const files = fs.readdirSync(path); for (let filename of files) { if (/.js$/.test(filename) && filename !== 'index.js') { console.log(`executing: ${path}\\${filename}`); const run = require(`${path}\\${filename}`); await […]