How to use keys from keyboard on ui vision code

please i need help ::i have this code

{
“Name”: “test_newsletter”,
“CreationDate”: “2025-1-19”,
“Commands”: [
{
“Command”: “open”,
“Target”: “https://www.deepseek.com/”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “2000”,
“Value”: “”,
“Description”: “Wait for 2 seconds for the page to load”
},
{
“Command”: “click”,
“Target”: “xpath=//*[contains(@class, ‘BannerCard_bannerCard__8xTj1’)]”,
“Value”: “”,
“Description”: “Click on the element with class ‘BannerCard_bannerCard__8xTj1’ in the new tab”
},
{
“Command”: “type”,
“Target”: “xpath=//textarea[@id=‘chat-input’]”,
“Value”: “please give me 20 website are not famous i want to sign up on it and put my eimail to get newsletter on my email”,
“Description”: “”
}
]
}

i want to use enter button on like when he type the text click on enter in keyboard to give me result

i’m already have use this code but doesn’t work .

{
“Command”: “sendKeys”,
“Target”: “id=prompt-textarea”, // Target the textarea by its ID
“Value”: “${KEY_ENTER}”, // Simulate pressing the Enter key
“Description”: “Press Enter after typing the message”
}

any suggestion please it’s gonna be great

it’s

{
“Command”: “XType”,
“Target”: “${KEY_ENTER}”,
“Value”: “”
}

Here are more:

KEY_LEFT (Navigation Left)
KEY_UP (Navigation Up)
KEY_RIGHT (Navigation Right)
KEY_DOWN (Navigation Down)
KEY_PGUP / KEY_PAGE_UP (Page up)
KEY_PGDN / KEY_PAGE_DOWN (Page down)
KEY_BKSP / KEY_BACKSPACE (Backspace)
KEY_DEL / KEY_DELETE (Delete)
KEY_ENTER (Enter)
KEY_TAB (Tab)
KEY_SPACE (Space)
KEY_SHIFT+KEY_TAB (Back Tab)

{
“Command”: “XType”,
“Target”: “${KEY_DOWN}”,
“Value”: “”
}

1 Like

thanks bro i appreciate your answer