I'am trying to fill stripe forms and typing is not working correctly, I'am facing the following scenario, puppeteer starts typing but stops before finishing or completely not typing in the field. I'am doing something like this:
// the issue appears when using the following
const iframe = await page.waitForSelector('iframe', { visible: true });
const iframeContent = await iframe.contentFrame();
await iframeContent.type('#cardNumber', value, { delay: 150 });
// adding timeout works
await page.waitForTimeout(5000);
const iframe = await page.waitForSelector('iframe', { visible: true });
const iframeContent = await iframe.contentFrame();
await iframeContent.type('#cardNumber', value, { delay: 150 });
I tried using page.waitForFrame() and it did not work