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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Browser instance | variable | Required | browser | Name that identifies this browser session. |
| Selector type | dropdownCSS · XPath · ID · Name · Text | Required | CSS | |
| Selector (optional) | string | Optional | Blank = press on the page. Example: #search Supports variables | |
| Key | string | Required | Example: Enter |
More Web Browser commands
Ready to automate your busywork?
Start your free 10-day trial today. No credit card, no commitment.