Assistance with Type Command

Hi there,

Pretty new to this so apologies in advance if my question seems a bit silly.

I’ve used UI.Vision to create a script that automates some of the the work I do online. So far everything except for one part of the script works perfectly.

The context: Essentially there’s a text entry box on a website that I need to type some data into. Once the data is typed into the box, a small drop down appears beneath the text box, containing suggested links to the relevant data that I’ve typed in (it exists already in the system and the data entered is the same every time).

Manually when performing this task, I would begin typing and the drop down would appear OR I would type in the data and hit the enter key for it to appear, giving me the link to click.

However when trying to use the ‘type’ or ‘sendkeys’ command the drop down link does not appear and my script hits a roadblock pausing the work I need it to do.

Any advice or guidance on what command could be used or how to get around this?

Thanks in advance all!

Hi, I suggest to replace type with xclick (to set focus) and then xtype - does it work then?

Do you mean use xtype first to type into the text box and then use xclick to hit the link that appears?

  1. Use XClick to set the focus on the text box. You can use the same locator as you are using now for the normal Type!
  2. Use XType to send the text (XType does not use a locator, unlike Type).Xtype sends its text to whatever place has the focus.
  3. Then you can probably use the normal click command to hit the link

Hi Plankton,

Thanks for the further guidance given.

So should this part of my script look like the below:

  "Command": "XClick",
  "Target": "id=smedley-test-run",
  "Value": ""
  "Command": "XType",
  "Target": "Smedley Test Typing",
  "Value": ""
  "Command": "xclick",
  "Target": "xpath=<removed for security>",
  "Value": ""

Do let me know if I have this right please :smile:


For your third command just do a XType | ${KEY_ENTER} and that should be exactly like you said works manually