Skip to content
Advertisement

How to fill an input field using Puppeteer?

I’m using Puppeteer for E2E test, and I am now trying to fill an input field with the code below:

JavaScript

It worked, but I found the email address was typed into the field one character by one character as if a real human being was typing.

Is it possible to fill the input field with the email address all at one time?

Advertisement

Answer

Just set value of input like this:

JavaScript

Here is an example of using it on Wikipedia:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement