2

I am trying to use global send keys to press "Down" and then "Enter", however the element that I am trying to spy loses functionality if I use the UI Automation mode every time.

So my question is if I spy my element with the HTML mode is there still a way to use the Global Send Keys as so far it I can only see the option to use them if the UI mode is used for spying.

Any solutions would be greatly appreciated.

Thanks

  • 1
    Have you tried the same strategy using Active Accessibility mode? In my own (anecdotal) experience, it seems to play nicer with the Global Send Keys functionality. – esqew Apr 23 '19 at 13:25
  • You can also use Global Send Keys or Global Send Key Events when sending them to the whole application (root node in the application tree) regardless the spy mode, however you would need to activate (for example click on) the filed you want to send keys to. Consider this as an alternative, if sending the keys with particular spying mode will not work. – Damian B May 15 '19 at 10:48

2 Answers2

2

Bit of incorrect information going on in this page so doing some work to steer people correctly here and then provide solution to OP's problem;

SendKeys are only utilised by the following attributes as of v6.4

UI Elements:

Button (UIA) elements
Check Box (UIA) elements
Radio Button (UIA) elements
Combo Box (UIA) elements
Edit Box (UIA) elements
Menu (UIA) elements
Menu Item (UIA) elements
List (UIA) elements
List Item (UIA) elements
Table (UIA) elements
Tab Control (UIA) elements
Tab Item (UIA) elements
Hyperlink (UIA) elements
Tree View (UIA) elements
Tree View Item (UIA) elements
Window (UIA) elements

Active Accessibility Elements:

Button (AA) elements
Combo Box (AA) elements
List Box (AA) elements
Edit (AA) elements

And lastly

Application elements (what some people call the root element)
SAP Main Windows

These are the only places you can use Send Keys.

As for Send Key events, these are for utilizing send keys typically on thin client applications like Citrix. A great explanation is posted here:

https://www.rpaforum.net/threads/global-send-keys-and-send-key-events.1587/

Also there is a data sheet on Send Keys called 'Guide to Send Keys and Send Key Events on the Blue Prism portal would recommend you read it. For the purposes of answering here to Op's various questions.

If you spy with HTML mode you can't use a HTML element to invoke Send Keys. You can use the root application sure but not the actual spied element. There is a sequence of events you could try where you use HTML/AA/similar to click the element you are targeting and then afterwards utilise either an element listed above or the root element to invoke send keys to perform the task you are looking for. In this case teh task you are trying to do in send keys is

{DOWN} 

for the down arrow or

{PGDN}

for page down if you wanted instead and then

{ENTER}

for the enter function

As stated by Blue Prism and other resources unless you absolutely need to do not use Send Key Events, it is not preferred.

Dexter Whelan
  • 414
  • 3
  • 15
-1

Yes, using a navigate stage Blue Prism allows for Global Send Keys to be utilized on elements spied in HTML mode.

This is especially useful/necessary when interacting with generatively constructed DOMs that like to mimic ractive front-end (looking at you SharePoint 2019).

Case-in-point: A dropdown that holds no values until clicked, at which point the JavaScript 'onclick' binding or shadow-DOM is activated to return the values. Thus these dropdown values are unavailable to spy/map in any consistent way, so you'd need to "navigate" and select based on Global Send Keys.

Alex P
  • 319
  • 1
  • 8