Pressing enter in puppeteer doesn't seem to have any effect. However, when I press other keys, it does what it should. This works:
await page.press('ArrowLeft');
This doesn't:
await page.press('Enter');
This is how the input looks like:
Any ideas?
EDIT: I've also tried page.keyboard.down & page.keyboard.up to be sure.
type(text[, options]) Sends a keydown , keypress / input , and keyup event for each character in the text. To press a special key, like Control or ArrowDown , use keyboard. press(key[, options]).
I've used page.keyboard.press('Enter');
usually :) Works for me.
Have a look at the documentation here. I think you should use .keyboard
before .press
for it to work properly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With