最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】pyppeteer中如何模拟输入回车键

模拟 crifan 4196浏览 0评论
折腾:
【未解决】Mac中用puppeteer自动操作浏览器实现百度搜索
期间,希望模拟输入 按 回车键,触发百度搜索
puppeteer keyboard press enter
javascript – Pressing Enter button in puppeteer – Stack Overflow
用代码:
await page.keyboard.press('Enter')
可以实现 输入回车键,触发搜索:
【总结】
pyppeteer中,模拟回车键:
await page.keyboard.press('Enter')

转载请注明:在路上 » 【已解决】pyppeteer中如何模拟输入回车键

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
87 queries in 0.155 seconds, using 22.03MB memory