Skip to content
masterclass Buddy

Playwright · Method

page.press

page.keyboard.press() sends one key press to the focused element. It supports named keys, characters, modifiers, and shortcuts such as Control+Shift+T.

Last updated

Since
before v1.9

Syntax

page.keyboard.press(key, delay=None)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • keyboard.down
  • keyboard.up
  • keyboard.type
  • keyboard.insert_text
  • locator.press

Source: Keyboard | Playwright Python. Checked 2026-11-03.