Need help with RoboSAPiens

Hi!
I’m new on SAP testing (and on SAP also).

I try to automate some use cases on SAP with RF.
First, i’ve done some tests on FIORI which is really easy with BROWSER.

Now, I try to automate some stuff on the SAP GUI but I have a blocking issue.

Manual steps:
1- launch the SAP LOGON PAD
2- put the server SID on the upper right textbox + ENTER
3- then click on the description line of the server in the Global workspace
4- the SAP GUI opens, so I can do some stuff

Unfortunatly, the RoboSAPiens project do not has detailled documentation nor examples.
Only the keywords list, without any explanations/usage.

So, I’ve tried the following:
1- Open SAP C:\Program Files (x86)\SAP\FrontEnd\SAPgui\saplogon.exe
2- Connect to Server ${SID}
3- ${Title} Get Window Title

The step 1 works perfectly (the SAP logon opens without any issue)
But the KW Connect to server fails. I thought it will perform the manual steps 2&3.
But it is not the case.

So I’ve tried something:
Open SAP C:\Program Files (x86)\SAP\FrontEnd\SAPgui\saplogon.exe
Sleep 20s
Connect to Running SAP
${Title} Get Window Title
Log to console ${Title}
Close SAP

During the 20 s of sleep, I do manually the steps 2&3.
So it works, RoboSAPiens can retrieves the window title.

The good news is that I can use RoboSAPiens to automate tests on SAP GUI.
The bad news, is that I do not understand how to automate the steps 2&3 with the RoboSAPiens library.

I hope somebody can share examples & tips, and the RoboSAPiens maintainer can improve the documentation of this project.

Thanks & Regards
Olivier

RoboSAPiens calls the SAP GUI Scripting API. The API provides a function for connecting to an SAP server using the description in the SAP Logon list, not the SID. This is of course more human friendly :slight_smile:

As a general rule, when using RoboSAPiens one should first try the most human friendly option. It usually works :slight_smile:

The documentation will keep improving with the feedback from the community. Please continue sharing your successes and failures with RoboSAPiens :slight_smile:

1 Like

Hello Oliver!

If it’s any help, here’s an image of part of my script to unlock a user that I’m still building. The login part works flawlessly.

PS: Just double checking: you did enable scripting in SAP Logon and on the server, right?

PPS: My login fields are ins Spanish, you may need to adapt to your language.

Thanks for you answers. Since this post, i have been successful to use the RoboSAPiens library, and I have made some progress: Opening SAP, connect a user, open a session, do some stuff like read rows in a table, access to ABAP code…
My main concern was how to provide the server’s name. I come from the web testing world so I’ve thought it should be more difficult.
In fact, this is easy to do with RoboSAPiens and my tests looks similar to yours. But thanks again for sharing,
it may helps other people and we can exchange each others about our findings and best practices around SAP automation testing.
Regards.
O.

1 Like

Hello!

You could provide the host name and credentials as command line parameters or environment variables.

I believe env vars are prefixes with %.