Keyboard Press
page.keyboard.press(key) simulates pressing a keyboard key. On the Keyboard Actions page, the #output div shows three bold values: the keys held down, the event type, and the previously typed keys. The last <strong> holds the typed keys.
Task:
- Navigate to
https://testkru.com/Interactions/KeyboardActions - Click on the page body to ensure focus
- Press the "a" key
- Print the text of the last
<strong>inside#output
Expected output:
Typed keys: a
TestKru