Skip to content
This repository was archived by the owner on Jan 19, 2021. It is now read-only.

Added code for pressing "Enter". #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions 1. basics/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const puppeteer = require('puppeteer');
await page.goto('https://trix-editor.org/')
await page.focus('trix-editor')
await page.keyboard.type('Just adding a title')
// If you want to submit with button use this code. This will press Enter.
// await page.keyboard.press("Enter");
await page.screenshot({ path: 'keyboard.png' })
await browser.close()
})()