无法上载网页上带有javascript代码的文件

无法上载网页上带有javascript代码的文件,javascript,node.js,puppeteer,Javascript,Node.js,Puppeteer,目标是使用任务调度器自动化进程,并将文件上载到网页。我已经确定了流程失败的代码部分。 我的javascript代码是: // We wait for the button "Send Invitations" appears on the webpage await page.waitForSelector('input[name=commit]', {visible: true}); // Upload the archive DIAS_ATRASO fileInput = await

目标是使用任务调度器自动化进程,并将文件上载到网页。我已经确定了流程失败的代码部分。 我的javascript代码是:

// We wait for the button "Send Invitations" appears on the webpage
await page.waitForSelector('input[name=commit]', {visible: true});  

// Upload the archive DIAS_ATRASO
fileInput = await page.$('input[type="file"]');
await fileInput.uploadFile(archivoDiasAtraso); 

// Wait 7 minutes for the archive to upload 
await page.waitFor(420000);
相关常量和变量:

var archivoDiasAtraso = filePath + 'XX_XX_XX_' + currentDate + '.zip';

const filePath = 'C:/Users/name/Documents/X/XX/';
浏览器中的代码如下所示:

同一页面上还有一个按钮,如下所示:

input type="submit" name="commit" value="Send Invitations" class="btn btn-lg btn-primary"
我不知道发生了什么变化,也无法确定到底是什么问题。如果你需要更多的信息,请告诉我。我希望有人能帮我。
谢谢大家!

您可以添加任何错误信息吗?我知道它不起作用的方式是自动化过程停止,但它是手动工作的。我不知道错误消息/信息会在哪里,你有没有获取这些信息的技巧?
input type="submit" name="commit" value="Send Invitations" class="btn btn-lg btn-primary"