Method: Playwright::Keyboard#type
- Defined in:
- lib/playwright_api/keyboard.rb
#type(text, delay: nil) ⇒ Object
Sends a keydown, keypress/input, and keyup event for each character in the text.
To press a special key, like Control or ArrowDown, use [‘method: Keyboard.press`].
“‘python sync page.keyboard.type(“Hello”) # types instantly page.keyboard.type(“World”, delay=100) # types slower, like a user “`
> NOTE: Modifier keys DO NOT effect keyboard.type. Holding down Shift will not type the text in upper case. > NOTE: For characters that are not on a US keyboard, only an input event will be sent.
123 124 125 |
# File 'lib/playwright_api/keyboard.rb', line 123 def type(text, delay: nil) wrap_impl(@impl.type(unwrap_impl(text), delay: unwrap_impl(delay))) end |