Combine Katalon Studio with SAP Scripting Tracker for Windows
Scripting Tracker is a utility and a replacement to the SAP GUI Scripting Development Tools. It is an SAP GUI analyzer and recorder on the SAP GUI Scripting base. You can learn more about SAP Scripting Tracker in the SAP blog post here: Scripting Tracker – Development Tool for SAP GUI Scripting.
This tutorial demonstrates how to combine Katalon Studio with SAP Scripting Tracker for Windows.
Requirements
- Katalon Studio version 7.0.0 onwards.
- WinAppDriver version 1.1.0 onwards. To learn more about setting up WinAppDriver, you can refer to this document: Set up WinAppDriver.
- SAP Scripting Tracker version 3.15 onwards. You can download the SAP Scripting Tracker from the Scripting Tracker website: Scripting Tracker.
Enable SAP GUI Scripting in SAP
To enable SAP scripting mode, you can refer to the SAP document here: Enabling Scripting on the Server Side.
Implement the Java code recording for SAP Scripting Tracker
Katalon can only read Java language generated from SAP Scripting Tracker. To use SAP GUI Scripting in the context of Java you need the Java COM Bridge (JACOB). You can download and install Java COM Bridge (JACOB) from the GitHub repository: Java COM Bridge (JACOB).
Build your test case in Katalon Studio
Download our sample Katalon SAP GUI project
This sample project provides you with code samples, custom keywords, and sample test cases that give you the necessary preparations to automate your test script with SAP Scripting Tracker.
You can clone or download the sample project here at our GitHub repository: Katalon SAP GUI sample project.
Add your login account to a test case in Katalon Studio
- After downloading our sample project, from the Test Explorer panel, open Profiles > default.
-
Double-click the Value cell of the username and password variables.
-
In the opened Edit variables dialog, change the sample value to your SAP account.
Create a new test case in Katalon Studio based on the sample project
-
Create a new test case. Go to File > New > Test Case.
-
From the Test Explorer panel of our sample project, go to Test Cases > Common folder. There are 3 sample test cases as follows:
StartSAPLogon This sample test case starts SAP Logon, then goes to the sign-in section. Login This sample test case starts an SAP session then uses the username and password variables to login TestCaseTemplate This sample test case calls the StartSAPLogon and Login test cases, then enables Katalon to read the SAP Scripting Tracker script. -
Open the Script tab of the TestCaseTemplate test case, copy the content and paste it into the Script tab of the new test case created from step 1.
Record test script using SAP Scripting Tracker
Start SAP Logon and sign in SAP GUI with your SAP account.
After signing in, open SAP Scripting Tracker. Click Refresh, then select the current SAP session.
Choose Java language, then click Record to start recording your SAP GUI script.
Here, we record the following scenario:
- In the opened SAP GUI session, go to SAP Menu > Human Resources. Double-click on PPMDT - Manager's Desktop. The Manager's Desktop interface opens.
- Double-click on Personal Data to open the folder.
- Navigate to Reports > Employee data, then click Maternity.
We stop recording here.
After finishing your recording, copy and paste the content from Scripting Tracker into your Katalon test script.
Run the test script in Katalon Studio
Make sure you have
WinAppDriver.exe
running from the installation directory. By default, you can find it atC:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe
.
To run the recorded test script, on the main toolbar, select Windows in the dropdown list next to Run.
Katalon Studio automatically signs in SAP GUI with your SAP account and playback the recorded steps from Scripting Tracker.