I am having some trouble trying to type text into an input field with Puppeteer. Here is the HTML for the website I am using, and it shows that the id of the field is creditCardNumber:
When I try to use page.focus and page.type, it say that there is no node for selector. Is this code wrong, or is there something better I can do?
await page.waitFor(1500);
await page.focus('#creditCardNumber');
await page.focus('#creditCardNumber', '1234', {delay: 5});
This is the error I get:
UnhandledPromiseRejectionWarning: Error: No node found for selector: #creditCardNumber
