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.3.tar.gz (18.6 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.3-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for robotframework_velo_sapgui-0.2.3.tar.gz
Algorithm Hash digest
SHA256 869d5f3f2e482681c5f0c375be679988faf6c30c97d10dbdbd6ec22b7ad35664
MD5 87dc8ca4c726327c3069fc0c2e41f980
BLAKE2b-256 f70cf163e02c64922355bc42a59e45e7720c2414273747d7bdb63d2f3f6173c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for robotframework_velo_sapgui-0.2.3.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.3-py3-none-any.whl.

File metadata

File hashes

Hashes for robotframework_velo_sapgui-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 eb77c9032dcf7058e34af986fa76a61b7aae8376c3a1a4f444d66329b28f0900
MD5 12b6aec722304f33dec8cd907fcf50b0
BLAKE2b-256 a84b6efb9cf74604dbc90738d16b16001d6e7fad8c484253a2e25c7cf56c1d46

See more details on using hashes here.

Provenance

The following attestation bundles were made for robotframework_velo_sapgui-0.2.3-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