Skip to content
CodeKruPro

Keyboard Type

54/70

Keyboard Type

page.keyboard.type(text) types text character by character. Unlike fill(), this simulates real keystroke events.

Task:

  1. Navigate to https://testkru.com/Elements/TextFields
  2. Click on the #lastNameWithPlaceholder field to focus it
  3. Type the word Hello with page.keyboard.type(), which sends one key event per character
  4. Print the field value

Expected output:

Typed: Hello