Skip to main content

Robot Framework keyword library for SAP GUI automation (Java and Windows)

Project description

robotframework-velo-sapgui

Robot Framework keyword library for SAP GUI automation on Java (py4j) and Windows (COM Scripting).

Backends

Backend Platform Prerequisites
java Linux Docker / Mac via Docker SAP GUI for Java + sapgui-engine gateway on port 8081
windows Native Windows laptop Customer-installed SAP GUI for Windows + scripting enabled
auto Default windows on win32, java elsewhere

Set Library VeloSapguiLibrary client=auto or export VELO_SAP_CLIENT=java|windows|auto.

Architecture

.robot suite
    │
    └─► VeloSapguiLibrary (Python)
              │
              ├─► JavaGatewayBackend ── py4j ──► sapgui-engine ──► SAP GUI for Java
              │
              └─► WindowsScriptingBackend ── COM ──► SAP GUI for Windows

Connection is lazy — resources are opened on the first keyword.

Installation

pip install robotframework-velo-sapgui

# Windows COM backend
pip install "robotframework-velo-sapgui[windows]"

Usage

*** Settings ***
Library    VeloSapguiLibrary    client=auto    port=8081    recording=True

*** Test Cases ***
Create Sales Order
    Connect             /H/my-sap-host/S/3200
    Type                User        MY_USER
    Type                Password    ${PASSWORD}
    Press Enter
    Open Transaction    VA01
    [Teardown]          Cleanup

Credentials and connection strings live in each suite so multi-role SAP flows can switch users within one test.

Scripting event capture

recording=True captures SAP scripting interaction events (not video) to events.jsonl under $RESULTS_DIR:

{"timestamp": "...", "action": "Type", "element_id": "...", "name": "User", "type": "", "value": "MY_USER", "screen_context": "...", "source": "automation"}

Optional keywords: Start Event Capture, Stop Event Capture, Get Captured Events.

Video MP4 for cloud runs is produced by the execution container (entrypoint.sh), not this library.

Library arguments

Argument Default Description
client auto SAP client backend: auto, java, or windows
port 8081 Java gateway port (java backend only)
recording False Start scripting event capture on first connect

Environment variables

Variable Description
VELO_SAP_CLIENT Override client library argument
RESULTS_DIR Output directory for screenshots and events.jsonl
VELO_EVENTS_PATH Override path for event capture file

SAP prerequisites

  • Server: sapgui/user_scripting = TRUE
  • Client: SAP GUI scripting enabled
  • Optional: sapgui/user_scripting_disable_recording = 0 (avoid recorder dialog during event capture)

Error handling

  • SapConnectionError — backend not reachable or scripting disabled
  • SapKeywordError — SAP action failed; message included in RF output

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework_velo_sapgui-0.2.5.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

robotframework_velo_sapgui-0.2.5-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file robotframework_velo_sapgui-0.2.5.tar.gz.

File metadata

File hashes

Hashes for robotframework_velo_sapgui-0.2.5.tar.gz
Algorithm Hash digest
SHA256 1700dc175850dd03e5a602e9cee64391637fda9604914329cebbcfd76ebd75ff
MD5 9ce4521a78b79ceb7018f3df54e7002d
BLAKE2b-256 f52e0c2fbfce2b11c852e9239fac0d35abba36a183f3e786fe00300ace2f31db

See more details on using hashes here.

Provenance

The following attestation bundles were made for robotframework_velo_sapgui-0.2.5.tar.gz:

Publisher: publish.yml on Hyper-Velo/robotframework-velo-sapgui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file robotframework_velo_sapgui-0.2.5-py3-none-any.whl.

File metadata

File hashes

Hashes for robotframework_velo_sapgui-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cf39057ea5345e24e28080cb8b94564d1d49f85b1c45a843253d8bb646f39f83
MD5 0763b8ecee6eb145dd1a87e68678edfc
BLAKE2b-256 dcf886ef5893debf6df8e6906c7535facb9548c51d4a0d089905e52b478b3ae6

See more details on using hashes here.

Provenance

The following attestation bundles were made for robotframework_velo_sapgui-0.2.5-py3-none-any.whl:

Publisher: publish.yml on Hyper-Velo/robotframework-velo-sapgui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page