有什么方法可以调试 puppeteer 脚本吗?由于某种原因,其中一个按钮没有被点击。我尝试了所有不同的方法,实际上在另一个脚本中我点击了它,但在这个我没有。
await page.focus('#outer-container > nav > span.right > span.search-notification-wrapper > span > form > input[type="text"]');
await page.type("Some text");
await page.click('#outer-container > nav > span.right > span.search-notification-wrapper > span > form'); // I am clicking on the form because it did work in the other script