Skip to main content

robosapiens-sapguirecorder

A floating desktop toolbar that records your actions in an open SAP GUI session with RoboSAPiens and saves them as a Robot Framework test. You can add steps and comments while you record; they are inserted at the right place in the saved .robot file.

Prerequisites

  • Windows with an interactive desktop and SAP GUI installed.
  • SAP GUI scripting enabled on both the client and the server.
  • Python 3.11 or newer.
  • An approved non-production SAP session open at the screen where you want to start recording.

The toolbar drives the RoboSAPiens 2.31.0 recorder command line (its start, stop, save and exit prompts, the --debug event output and the HTML report). The dependency is therefore pinned to robotframework-robosapiens==2.31.0.

Install

pip install robosapiens-sapguirecorder

To install the latest development version from GitHub:

pip install "git+https://github.com/sap-robotop/rf-sapguirecorder.git"

This installs RoboSAPiens, Robot Framework and PySide6 (the toolbar UI).

Record a test

With the intended SAP session open:

sapgui-recorder --name my_test

(python -m sapguirecorder --name my_test is equivalent.)

  1. Select Start.
  2. Before the actions of a logical step, type its label and select Add Step (or press Enter). Then perform those actions in SAP GUI.
  3. To add a Robot comment, type it in the comment field and select Add Comment.
  4. Wait for each SAP action to finish before adding the next step or comment.
  5. Select Stop, then Save & Exit.

The Logs box shows each step, comment and SAP action as it happens:

Step 1: Enter Tcode
Action: Execute Transaction    se16n
Action: Press Key Combination    Enter
Step 2: Enter Table name
Action: Fill Text Field    Where-Used list: Table    PA0105

Steps and comments are placed automatically by comparing their click times with the action timestamps in the RoboSAPiens report. If that cannot be verified, the toolbar asks where to place each one (before an action, at the end, or unplaced). Popup closes (Close Window), which RoboSAPiens 2.31 sees but does not write, are inserted by the toolbar.

Names must be 1-80 ASCII letters, digits, _ or -, start with a letter or digit, and must not be Windows device names such as CON. Existing captures are never overwritten.

The recorder has no session picker: close other SAP sessions to avoid recording the wrong one. Avoid recording passwords or sensitive data.

Output

File Contents
<name>.robot Header from the template (if any), recorded actions, steps and comments
<name>.html Original RoboSAPiens report, including screenshots

Steps use the Step keyword from the bundled library sapguirecorder.steps, which is imported automatically when needed. Actions after a step are indented for readability:

*** Settings ***
Library    sapguirecorder.steps
Library    RoboSAPiens    x64=True

*** Test Cases ***
my_test
    Connect to running SAP
    Step    Open transaction
        # Verify the expected program is selected
        Execute Transaction    SE38

After saving, the terminal prints Saved Robot file: <path> and the final log on stderr, and a JSON result on stdout ({"status": "saved", "robot": ..., "html": ..., "unplaced_steps": 0, ...}). Exit codes: 0 saved, 2 cancelled, 1 error.

The HTML report can contain screenshots and SAP window titles; keep captures local and review them before sharing.

Configuration

Option pyproject.toml key Default
--output-dir DIR output-dir current folder
--robot-template FILE robot-template 00_template.robot in the output folder, if present

Settings are read from the [tool.sapguirecorder] table of the nearest pyproject.toml (searching from the current folder upwards); paths are relative to that file. Command-line options take precedence. Unknown keys are rejected so typos are not silently ignored.

[tool.sapguirecorder]
output-dir = "tests/recordings"
# Robot file whose *** Settings *** section (resources, libraries, variables,
# setups, teardowns, tags) becomes the header of every recording.
robot-template = "tests/recordings/00_template.robot"

Header template

A template is a Robot file with a *** Settings *** section followed by an empty *** Test Cases *** section:

*** Settings ***
Library           RoboSAPiens    x64=True
Library           sapguirecorder.steps
Suite Setup       Connect To Running SAP
Test Tags         sapgui    recorded


*** Test Cases ***

The generated file is the template header, verbatim, followed by the recorded test case with the toolbar's steps, comments and actions:

  • Every recorded *** Settings *** line (Library RoboSAPiens x64=True, Test Setup Open SAP ...) is discarded; the template owns imports, variables, setups and the SAP connection.
  • The leading Connect to running SAP action that RoboSAPiens always records is dropped, because the template's setup owns the SAP connection. Without a template it is kept.
  • The template must make the Step keyword available, either with Library sapguirecorder.steps or through a resource defining Step.

Without a template, the raw RoboSAPiens settings are kept and Library sapguirecorder.steps is added when steps were placed.

An explicitly configured template must exist; the default one is optional.

Pausing

RoboSAPiens 2.31 does not support pause/resume: start after stop creates a new recorder. Save each segment under a new name and combine them manually.

Troubleshooting

  • Capture already exists: choose a new name (.robot, .html, and legacy .robot.raw / .steps.json files block reuse).
  • Invalid template: it must contain Settings followed by an empty Test Cases section.
  • Cannot lock the Recorder folder: close the other toolbar and check that the output folder is writable.
  • Finalizing failed: the original RoboSAPiens file is left unchanged. Use Show Details to copy your steps and comments.
  • Automatic placement unavailable: place the annotations in the dialogs and review the saved file.

Development

python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e ".[test]"
.\.venv\Scripts\python.exe -m pytest

Build the distribution with python -m build.

Release

Releases are published to PyPI by the Publish workflow using Trusted Publishing. Bump version in pyproject.toml, commit, then push a matching tag:

git tag -a v0.1.1 -m "v0.1.1"
git push origin v0.1.1

The workflow runs the tests, builds the distributions, publishes them to TestPyPI, then to PyPI. It fails if the tag does not match the version.

License

Apache License 2.0. See LICENSE.

Metadata

Release files for robosapiens-sapguirecorder 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for robosapiens-sapguirecorder 0.1.1
File Size Uploaded Provenance Actions
robosapiens_sapguirecorder-0.1.1.tar.gz 35.7 kB With provenance Details for robosapiens_sapguirecorder-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for robosapiens-sapguirecorder 0.1.1
File Interpreter ABI Platform Actions
robosapiens_sapguirecorder-0.1.1-py3-none-any.whl Python 3 none any Details for robosapiens_sapguirecorder-0.1.1-py3-none-any.whl

Total release size: 62.6 kB

Release files / robosapiens_sapguirecorder-0.1.1.tar.gz

Download URL robosapiens_sapguirecorder-0.1.1.tar.gz
Size 35.7 kB
Tags Source
SHA-256 checksum
How to use checksums
60590e952176b982d039e1825ee01c330be036865baad8fefbe7911cc9144aae
BLAKE2b-256 checksum
How to use checksums
701764a3e22d446f5ed2b59a5229b4ed20b73f3d1ab43c6f53ca0980792adf54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / robosapiens_sapguirecorder-0.1.1-py3-none-any.whl

Download URL robosapiens_sapguirecorder-0.1.1-py3-none-any.whl
Size 26.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
782b04b91272940d9d15eb0553d525cd82e6f2793f2c52b67feae1891af3da87
BLAKE2b-256 checksum
How to use checksums
5a7810d8598db7def98ac9626caf72a335caee6645423f14903471f804655955
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Security for robosapiens-sapguirecorder 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for robosapiens_sapguirecorder-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page