GUI scripting works unreliably

GUI Scripting Issue – SAP & UiPath

We are currently experiencing problems with GUI scripting. We are not sure whether the error is on the SAP side or on the UiPath side.
Client & Server: we have made the settings that have been described in the UiPath-Documentation


Observation

  • The automation reaches the inbox from the core area and selects individual work items.
  • After selecting a work item, GUI scripting works unreliably in some cases.

Presumably, another system is accessed at this point and embedded using Dympro from the CRM system.

  • :white_check_mark: If scripting works: the object tree is recognised correctly.
  • :cross_mark: If scripting fails: the object tree is not visible, and the link to another system cannot be accessed.

It is always the same place where the problem occurs.
It feels like: 15 times it doesn’t work, and on the 16th attempt it works — but it is not reproducible.


What we’ve checked

  • SAP admins have reviewed and confirmed that all authorisations are enabled, as far as visible.
  • We are on a virtual machine (not using Citrix).
  • The system was stable for a long time, then the problem suddenly began.
  • So far, no correlation to updates has been identified.

Versions in use

  • UiPath Studio: 2024.10.8
  • SAP: 8.00 PL 13 64 Bit

Has anyone experienced something similar?

1 Like

Hi @sven.behncke1 , can you help me with below queries ?

is it possible for you to provide screenshot?
have you enabled the scripting through RZ11?
Did you use SAP activates to automate the process?

Agree with @pankajdhane

@sven.behncke1 to be able to understand your automation challenge better, please share following information:

  • SAP WinGUI transaction
  • UiPath UiAutomation Activity version

In addition share the following screenshots:

  • SAP WinGUI screenshot - * Full screen (you can blurry the business information)
  • SAP UiPath Studio selectors of SAP element

Best regards, Lev

Thanks for the suggestions.

Our SAP admins have permanently set scripting to true and enabled it across all instances.

I hope the screenshots help.

In 1 we have SAP-Core, in 2 the data comes from SAP-CRM.
Soemtimes it works, mostly not. Strange behavior.

Selektor, when scripting is not working

Selektor, when it works

Here my Activity-Versions

@sven.behncke1

So, let’s begin the clarification. From the UiPath side, I’m pleased with what I see—it appears everything is up to date. A good start!

:white_check_mark: The Studio version is correct.
:white_check_mark: The activity package is correct.

Now, regarding the SAP portion of our discussion:

You are using SAP NetWeaver Business Client (NWBC), and within that, you are running SAP CRM Business App, which is running in SAP WinGUI client.

The SAP WinGUI relies on the SAP Scripting interface, which ensures automation is fully stable and reliable. In case it is SAP Scripting interface, all selectors starts with SAP-ID and are unique.

However, here’s where it gets tricky: in your screenshot, SAP WinGUI is opening an HTML page, which is not compatible with the scripting interface.

See the docs, I wrote exact to this scenario: Studio - Supported SAP WinGUI Elements

This also explains what is visible in your screenshot:

:one: – The first part is a native SAP WinGUI screen, where scripting always works, because it has full support for the SAP Scripting API.
:two: – The second part is an HTML interface, which is essentially a web page and not using the standard SAP Scripting interface.

Essentially, the structure is as follows: an embedded HTML page within SAP WinGUI, which itself is embedded within SAP NWBC. :winking_face_with_tongue:

Additionally, please note that changes in how the HTML page is rendered may occur depending on your default browser (e.g., Internet Explorer, Chrome). This is because SAP NWBC uses your system’s default browser engine to render HTML content within SAP WinGUI.

The possible solution could be to try different identification methods such as AA or UIA

Best regards, Lev

Hello,

after I changed the project settings as recommended by UiPath support. The process runs reliably again at this point.
This parameter seems to be Default False.

So I have a solution for now, but I wonder why it worked before, even though the parameter was False.

If anyone can explain this, I would be very grateful.