Click on Element - SAP environment

Hi,
I have to click on SAP elements but I realized that the “click on element” activity reads only the biggest frame and the activity doesn’t detect the elements inside

thanks

2 Likes

@daniele_arcangeli Is it an Iframe? If yes, then use ‘Find Iframe’ Activity and select the iframe first. Use xpath/css selector to select the element inside an iframe. Please go through the link below.
Find Iframe – ElectroNeek Help Center

1 Like

I’ve been working on a SAP automation too and I’ve been dealing with the exct same issue. It’s very annoying… Well, apparently, in SAP you can only pick fields that are active (with an active cursor blinking and all). But when you run the bot it doesn’t work anyway. So I’ve been using Click o image to make the field active before inseting whatever needs to be inerted into it. Another option is to use Click on coordinates. Those are the only ways I can make it work.

2 Likes

Have you tried to do this using SAP scripting, You should have permission to allow that then the script will be created. I have done this using AA but not using Electroneek, Let me know the results.

1 Like

Hi @Kudlappa_Gouder , unfortunately the iframe activity allows you to collect only frames from browsers and not from windows applications

1 Like

Hello @daniele_arcangeli,

I don’t know if it would be possible for your project, but if it is not possible to select the elements in the GUI, one alternative would be to build the bot using Machine vision, clicking on images and inputting data to the focused elements.

Otherwise, please contact the support team so they will be able to deeply analyze your situation.

2 Likes

Daniele,
first look at the value of the iframe’s src property.
then use the url that is in this property instead of the url you are using.
With this, you will be able to access the elements normally. maybe in one or the other case you need to use xpath.

1 Like

Hi @Renan.Mancilha , you can use machine vision, but it is very fragile. If a user run the BOT with a different screen resolution than the developer, the bot is not able to use the activity machine vision.

2 Likes

Hi, @daniele_arcangeli With this, please open a ticket in the support center for further evaluation and analysis.

Happy automation with ElectroNeek!

1 Like

It’s true. That is also why I avoid Click on coordinate as much as possible. But sometimes it’s inevitable. Unfortunately, there isn’t much you can do when dealing with SAP :frowning:

One solution for this is to include in the documentation for the bot a rule with the specific resolution and scale of the screen that allows the bot to run smoothly.

Another alternative, if possible, is to develop the bot in the same environment it will be executed. Suppose the bot will “live” in a virtual machine. Well, you can develop the bot in said machine remotely. It helps to avoid rework with element picking and coordinates.

3 Likes

Hi @daniele_arcangeli, in this case you can force a resolution. At the beggining of the workflow you can run a command prompt to force a specific resolution. So forcing the same resolution used during the development would avoid such errors.

In this article you can find the command: Console window small resolution and/or size – ElectroNeek Help Center

I hope that helps!

4 Likes

Hello @Sergio_Souza this version of SAP its a Desktop automation.

2 Likes

I agree, I hava a bot where I uusing this version of SAP, every time the Server resolution is changed, the service is broken. It works stable but you need to ensure that the window where it will be executed is active, image size has to be precise, because if the screen is not maximized it already changes. Isn’t there a way to leave the elements enabled via SAP or ABAP script?
@Renan.Mancilha

1 Like

Currently the only solution to navigate in SAP application is TAB or ALT+TAB key

2 Likes

We needed greater integration with SAP as most projects in medium and large companies involve SAP. Only the use of machine vision makes our projects fragile and slower.

1 Like

Thank you for sharing your solutions. @daniele_arcangeli, @pedro.azevedo @cris-dsc @nipunad @Sergio_Souza

1 Like

Tragically, that does not work for me. At least not in SAP Business One. The Send Hotkey activity won’t work, but at the same time there are no errors… I don’t understand.

1 Like

check if the window is atctivate.

It is activated. I know because I’ve tried using this activity after inserting something in a field or clicking on some other element in the window. But when I use Send Hotkey, nothing happens and there’s no error. The activity is executed, but the result is nothing.