Ricky
Ricky

Reputation: 153

Stop Puppeteer deleting text instantly

I am trying to have my Pupeteer autofill information on a PayPal page, but when I try typing it will instantly delete my info, here is a clip showing what happens: https://gyazo.com/205c07d98126ec31fe5c06551164d8d1

Here is my code:

await page.waitForSelector('input[id="cc"]');
page.type('#cc', '1234123412341234');

Not sure what is going wrong, I have tried changing the elements 'value' attribute, but when submitting the form it does not recognize the information. Not sure what else to do! :(

Upvotes: 0

Views: 113

Answers (1)

NoriSte
NoriSte

Reputation: 3709

Two things that come to my mind to check:

  • check if you have the same problem with other input fields out of Paypal. It could be important to isolate the problem and make a more precise research
  • check if the problem is related only to Puppeteer or is shared with other UI testing frameworks (like Cypress, TestCafè, Selenium). It's important to understand if it's Paypal that is doing something to block every browser automation tool (I would do it if I were in their place) or if they have a bug (it seems a mistake issue with React/Vue controlled input fields) that has something related to the automation.

Upvotes: 1

Related Questions