Different behavior between process launched via UIRobot.exe and UIPath icon from traybar?

Hello,

I’m facing a strange behavior and I cannot find a solution…
I’ll will try to explain the problem as clear as possible, so this post could be a little bit long :wink:

I’ve a script that automate Magnitude software (Accounting software from SAP) under Citrix.
The script is used in two “flavors”:

  • The first one is the complete process: login to web interface, start Magnitude software using .ica file, login into the Magnitude session, select the period and run the reports.
  • The second one will “reuse” the Magnitude session opened by a previous call. Thus directly type the period and run the reports.

It’s the same script. The only difference in the second case is that the “open new session” activity is not run if a Magnitude window is detected.

The robot (v2018.4.4) run on a VDI (accessed via RDP for the test otherwise the session is redirected to the console to avoid automatic locking).

The scripts are run on demand via a piece of code that receive some specifics mails and call the UIRobot.exe utility to launch the UIPath scripts (UIRobot.exe -process xxx -input {xxx}).

When running on the first time (“full run”), the script run fine, the data are correctly exported. Even when the RDP session is not open.
If I call a second time (“reuse run”), the script failed when the robot try to type into the application.
If I launch the script from the UIPath traybar utility the script run fine. No problem to type text into the application…

To go in details, to enter the period the script will do the following actions :

  • Click on textbox
  • Type Home
  • Type Shift + End
  • Type Del
  • Type “R-CONSO 2019-09”

When running the “full script”, no problem.
When “reusing” the session I can see the caret into the textbox (Click on textbox) but the type into seems to be misinterpreted, nothing is typed, sometime the context menu from the application is open (just like we type Alt + Space).

If I let the focus onto the RDP window the script run fine in both cases…

I recorded the screen in both situation to show the result more visually :wink:
The zip contains two .mp4 files for the “Full Run” and the “ReUse Run”.

period_record.zip (292.7 KB)

I tried a couples of things without success (click on the window to ensure the focus, minimize/maximize, all options from the Type Into activity, record any keys using a keylogger to verifiy what is exactly typed, use Set Focus or Activate activities…).

I cannot find the root cause of the problem :frowning:

Any idea about this problem ?

Thanks,
Boris

I met a similar problem once.

In my case, executions launched from UIRobot or via .bat files can NOT find element at all, while it ran smoothly using UIPath studio (that big green play button on the top).

The sample I ran is just the same one but constantly got Error while using robot tray. I was totally confused :scream: :scream: :scream: and tried to searched through the forum but didn’t find relevant post.

At last, I suddenly realized that it’s probably something with OS permissions. I tried right-click the .bat file (used to run .xaml file with robot.exe) and chose ''Run as administrator" and it finally started working correctly.

Though I did not test, I suppose that if you want to use robot tray, just give the UiRobot.exe application enough OS permission to run the process.

Hope this little sharing could help someone who might encounters same problem.