我试图通过puppeteer将图像文件上传到输入,但出现下一个错误:
(节点:16748)UnhandledPromiseRejectionWarning:TypeError:无法读取 属性“ uploadFile”为空
我已经尝试了下一个给我上面错误的代码:
const filePath = 'audio.mp3';
const input = await page.$('input[type="file"]');
await input.uploadFile(filePath);
我希望得到一些帮助:)