Are the activities like send hotkey, type into, click activities application specific?
The reason is for example send hotkey ctrl +o to open a particular file works fine with ms access but it is not working for few applications like Alteryx, Spyder(IDE for Python). I have also tried to use in a sequence open application and attach window then click activity and then pass the send hotkey action but what I noticed that for these applications the selectors are window based as in it is not recognizing specific elements on the screen such as click on the file button and then click open as an alternative.
Is there something I am missing or has anyone faced the same issue and has a work around?
There are different types of ways to simulate a click and some applications can have an incompatibility with specific ones.
The three types are:
Native
Simulate Click
SendWindowMessages
While Native should work every time, the other two are not always supported (which indeed depends on the application).
Many times it is also the case of the selector. For example, for Send Hotkey activities I would suggest the selector that points to the entire main window of the target application.
There can also be an issue of elevated permissions. In case a specific application runs with administrator rights, Studio will not be able to catch the proper selectors unless also run with elevated permissions.
And sometimes, of course, it can be an unexpected behaviour that should be fixed
As per my understanding the above mentioned applications Alteryx, Spyder(IDE for Python) do not run with administrator rights. The odd part is the workflow runs without any giving any errors but does not pass the hotkeys or does a type into.
Let’s say for example I have indicated the screen as well and before that I have used the Native click the selector that I get for both the activities even with UI Explorer for the application which is deployed locally on my machine is wnd app=‘pythonw.exe’ cls=‘Qt5QWindowIcon’ title=‘Spyder (Python 3.6)’ and there are no other tree elements.
Similarly for Alteryx rather than being able to select the particular button to click on, the explorer is capturing the whole toolbar and not being able to segregate just the element.
Indeed, some applications are more difficult to work than others.
What I would try as far as hotkeys are concerned. Use Activate activity to bring the main program window to the foreground.
Then, send hotkey without any selector. It should work.
Another workaround to select specific portion of the scrip is of course Click Image activity. If you try it a bit, you will find that it is surprisingly good at finding pieces of the screen, but at a cost of not being able to automate in the background (for obvious reasons).
Another way to select things in menus that do not have a specific selector would be to use an offset value in the Click properties:
With that you could say to the activity → select this big bar that is selectable, place the cursor top left and then add an offset to point to specific menus.
This should work in the background, but will require some fun to find the correct offsets.
The thing with UiPath is that there is always a way, it just takes time to learn all the options
I have tried by using Activate Activity and then passing some hot keys in Alteryx.
What I am able to see is,Activate Activity is working fine,it is bringing up Alteryx window in front position but after that the Hot Keys are not working.
For example I was trying to pass ALT+O after activate activity,ideally which should open up Alteryx and then it should open Alteryx Open File window,but it is simply Activating the Alteryx page and ending the BOT without any error.
I have also tried the click option by trying couple of offsetX and Y values and moving the Cursor position to Top left.
But this also not working for me.I can understand that we should try couple of more set of OffsetX and Y values,but that will be applicable when we can see that the cursor is clicking on some place of that active window.Unfortunately there is no such movement of cursor.
I have tried the same setup as Diptendu mentioned with SendWindowMessages checked in the Hotkey properties but it is not helping either. The whole workflow is running without errors but nothing is happening.
Is there any other way to tavkle this issue or reason as to why this is happening?
I would suggest trying out different selectors for the Send Hotkey activity.
First, I would test if the workflow will work with a simple Notepad. Then, I would replace the Notepad try-out with the desired application.
The selector of the Send Hotkey activity might be crucial here. I would first try without it, then I would try with the selector that contains entire window app. If not, maybe a smaller window within the app (although this was never too successful for me).