Pressing Enter button in puppeteer

前端 未结 6 1046
面向向阳花
面向向阳花 2020-12-24 10:57

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(\'Arrow         


        
6条回答
  •  不思量自难忘°
    2020-12-24 11:47

    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.

提交回复
热议问题