Press Key

Press a keyboard key on an element, or on the page if no selector is given (e.g. Enter, Tab, Escape).

Web BrowserSeleniumBrowserPressKey

What it does

Press a keyboard key on an element, or on the page if no selector is given (e.g. Enter, Tab, Escape).

Parameters

ParameterTypeRequiredDefaultDescription
Browser instancevariable
RequiredbrowserName that identifies this browser session.
Selector typedropdown
CSS · XPath · ID · Name · Text
RequiredCSS
Selector (optional)string
OptionalBlank = press on the page.
Example: #search
Supports variables
Keystring
Required
Example: Enter

More Web Browser commands

Ready to automate your busywork?

Start your free 10-day trial today. No credit card, no commitment.