Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

SAP User Actions

Introduction

  • User actions in SAP refer to functional commands that enable users to interact with and manipulate the features and functionalities of a desktop SAP application. These actions are typically scripted in VBScript to automate tasks and interactions between users and the SAP application.

  • Qyrus offers a comprehensive selection of SAP action types categorized based on their specific nature. Each user action includes both mandatory and optional input parameters, with mandatory inputs indicated by an asterisk (*).

Table of Contents

Application Actions

1. Start

This action starts the specified .exe and attaches its execution to the designated SAP application.

Inputs:

  • Application Path* – Path to the .exe for the SAP application.

  • Start Delay – Wait time for application start.

Supported verifiers: Verify Text, Dynamic Verify Text, Contains, Dynamic Contains, Is Blank, Verify Combobox Item, Verify Visibility By Image, Dynamic Verify Greater Than, Dynamic Verify Less Than, Verify Greater Than, Verify Less Than, Verify Not Null, and Verify Expression.

Start Action

2. Kill EXE

This action terminates the specified .exe.

Inputs:

  • EXE Path* – Path to the .exe to be terminated.

Kill EXE Action

User Access Actions

1. Login To SAP

This action performs a login operation on the specified SAP system using user credentials.

Inputs:

  • Client*

  • Language

  • Password*

  • SAP System Name*

  • UserName*

Login To SAP Action

2. Logout From SAP

This action performs a logout operation on the SAP system which is active.

Logout From SAP Action

Mouse Events

1. Click

This action simulates a mouse click on the specified element.

Inputs:

  • Locator Type*

  • Locator Value*

Click Action

2. Click By Coordinates

This action simulates a mouse click at the specified coordinates (x, y).

Inputs:

  • Coordinates Value* - (x, y)

Example: Coordinates Value - (540, 625)

Click By Coordinates Action

3. Double Click

This action performs a double click on the specified element.

Inputs:

  • Locator Type*

  • Locator Value*

Example: Locator Type: "id" Locator Value: "wnd[1]/tbar[0]/btn[12]"

Double Click Action

4. Double Click By Coordinates

This action performs a double click at the specified coordinates (x, y).

Inputs:

  • Coordinates Value* - (x, y)

Double Click By Coordinates Action

5. Right Click By Coordinates

This action performs a right click at the specified coordinates (x, y).

Inputs:

  • Coordinates Value* - (x, y)

Right Click By Coordinates Action

Keyboard Events

1. Set

This action sets a value for a control like an edit (text box) for the specified element.

Inputs:

  • Data Value*

  • Locator Type*

  • Locator Value*

Set Action

2. Set By Coordinates

This action sets a value for a control like an edit (text box) at the specified coordinates (x, y).

Inputs:

  • Coordinates Value* - (x, y)

  • Data Value*

Set By Coordinates Action

3. Send Keys

This action simulates keyboard input by sending actual keyboard keys as they are.

Inputs:

  • Keys*

Send Keys Action

4. Send Virtual Keys

This action simulates key presses in the application by sending virtual key codes directly.

Inputs:

  • Locator Type* - Specifies how to locate the element.

  • Locator Value* - Value or expression for locating the element.

  • Virtual Keys* - Specifies the virtual key code(s) to send to the application.

Send Virtual Keys Action

5. Clear

This action clears the specified element.

Inputs:

  • Locator Type*

  • Locator Value*

Clear Action

Verifiers

1. Verify Text

This action verifies whether the text of the specified element matches the specified data value.

Inputs:

  • Locator Type*

  • Locator Value*

  • Data Value*

Verify Text Action

2. Contains

This action verifies whether the specified element contains the text specified in the data field.

Inputs:

  • Locator Type*

  • Locator Value*

  • Data Value*

Contains Action

3. Is Blank

This action verifies whether the specified element's text is blank or not.

Inputs:

  • Locator Type*

  • Locator Value*

Is Blank Action

4. VerifyComboboxItem

This action verifies the selected item from the ComboBox and compares it to the expected value.

Inputs:

  • Locator Type* - Specifies how to locate the ComboBox.

  • Locator Value* - Value or expression for locating the ComboBox.

  • Property* - Specifies the attribute or characteristic of the ComboBox to verify.

  • Property Value* - The expected value to compare with the actual value.

Verify ComboBox Item Action

5. Verify Greater Than

This action checks whether the specified element's value is greater than provided in the data field. There are two value type supported here Date and Number. Format is applicable for Date and is optional. Eg. dd/mm/yyyy hh🇲🇲ss

Inputs:

  • Locator Type*

  • Locator Value*

  • Data Value*

  • Value Type*

  • Format For Locator’s Value

  • Format For Data

VerifyGreaterThan

6. Verify Less Than

This action checks whether the specified element's value is less than provided in the data field. There are two value type supported here Date and Number. Format is applicable for Date and is optional. Eg. dd/mm/yyyy hh🇲🇲ss

Inputs:

  • Locator Type*

  • Locator Value*

  • Data Value*

  • Value Type*

  • Format For Locator’s Value

  • Format For Data

VerifyLessThan

7. Verify Not Null

This action checks whether the specified element's value is not null.

Inputs:

  • Locator Type*

  • Locator Value*

VerifyNotNull

Functions:

1.Execute Test Case

This action allows users to invoke entire test script as test step within another script, promoting reusability.

Inputs:

  • Script Name*

  • Data

Note: If this user action is parameterized, the 'Data' field will be changed into 'Data Column', which is a mandatory field.

You can find extensive information on how to use this user action effectively in the complete guide provided at this link .

Execute Test Case

Python Handler

1. Execute Python Script

Runs custom Python code as part of an SAP test. Use it when test logic needs to perform work that is better handled in Python, then continue with the remaining SAP steps.

Inputs:

  • Variable Names — optional comma-separated names of variables that the script uses or returns.

  • Code* — the Python code to execute.

The active SAP session is available by default in the Python execution context, so the code can interact with the current SAP session without an additional connection step.

Conditional

1. Start If

This action signifies the beginning of an if condition, and subsequent tests related to this action type will be considered as steps within the if condition block. These steps will only be executed if the condition is satisfied. It exclusively supports verifiers.

Inputs:

  • Verifier

  • Data Value*

  • Locator Type*

  • Locator Value*

  • Property*

  • Property Value*

Start If Action
Start If Action
Start If Action
Start If Action
Start If Action
Start If Action
Start If Action
Start If Action
Start If Action
Start If Action
2. End If

This action denotes the end of the immediate above if condition.

Nested conditional statements can be used with if conditions to form complex logical tests.

End If Action

Functions: Loop Actions

1. Loop

This action repeats a group of steps multiple times — either for a fixed number of repetitions, or once for every row in a linked data table — and stops automatically once a defined condition is reached. Use it any time you need to click through a list, fill a table row by row, or repeat a set of actions until something on screen changes.

Inputs:

Iteration Settings — choose one:

  • Set by Index

    • Start Index — the number to begin counting from

    • Increment By — how much to add to the count after each pass

    • Iterator Name* — a name for this counter, so later steps in the loop can refer to "the current number"

  • Set by Variable

    • Iterator Name* — same as above, but the starting number is pulled from a value captured earlier in the test instead of being typed in

Link Table (optional)

  • Choose Table — attach a data table so the loop runs once per row instead of counting by number. Later steps can then pull values straight from that row.

Exit Condition — choose one:

  • Exit by Index

    • End Index — the loop stops once the count reaches this number

  • Exit by Verifier

    • Verifier* — a check (e.g. Verify Text) that's run at the end of every pass; the loop stops as soon as it passes

    • Maximum Loops Allowed — a safety limit so the loop can't run forever if the check never passes

    • Data Value* — the value the check should find

    • Locator Type* — how the element being checked is identified (Id, Name, etc.)

    • Locator Value* — the location/path of that element on screen

Below these settings, add the steps you want repeated in the Loop Items area.

Loop Action

How to use it:

  1. Add a Loop step and give it a description.

  2. Decide how it should count: pick Set by Index for a plain "start at 0, go up by 1" counter, or Set by Variable if the starting point should come from something the test discovered earlier.

  3. If you're working through a table of data (e.g. a list of items to enter one by one), click Choose Table and link it — the loop will then run once per row automatically.

  4. Decide how it should stop: pick Exit by Index for a simple "run N times," or Exit by Verifier if it should keep going until something appears/changes on screen (with a maximum-loops safety net in case it never does).

  5. Add the steps to repeat inside Loop Items, using the Iterator Name (and table columns, if linked) wherever you'd normally type a fixed value — the loop will substitute the current count or row value on each pass.

Using TDM columns or variables in Data Value / Locator Value:

Any Data Value or Locator Value field on a step placed inside Loop Items can pull from the linked TDM table or from a variable instead of a fixed value. Click the info (ⓘ) icon next to the field to open the picker, then switch between:

  • Columns — insert a column from the table linked via Choose Table (e.g. Item, Desc). The step then uses that column's value from the current row on every pass of the loop.

  • Variables — insert a variable captured earlier in the test (e.g. the Iterator Name), so the step uses that dynamic value instead of a fixed one.

Selecting a column or variable inserts it as a token into the field, so the value updates automatically each time the loop runs.

Combining static and dynamic values in the same field: A field isn't limited to a single token — you can type fixed (static) text directly into the field and then insert a column or variable token alongside it. The two parts are joined into one value at runtime. For example, typing Editing Control into Locator Value and then inserting the Last Name column produces a locator built from the static text plus that row's Last Name value on every pass of the loop.

Use TDM Columns or Variables in Loop

Tips:

  • If a table is linked and you also set an End Index, the loop won't run past the last row in the table.

  • The Maximum Loops Allowed limit only kicks in when you're exiting by verifier — it doesn't apply when exiting by index.

  • Loops can be nested (a loop inside a loop) — just give each one a different Iterator Name so they don't overwrite each other.

2. Break Loop

Stops the current loop immediately. Use this action only inside a Loop when no remaining loop items should run.

The Break Loop action must be enclosed by a Start If and End If block. Configure the verifier in Start If to identify the condition that should end the loop.

3. Continue Loop

Skips the remaining items in the current loop iteration and starts the next iteration. Use this action only inside a Loop.

The Continue Loop action must be enclosed by a Start If and End If block. Configure the verifier in Start If to identify the condition that should skip the current loop iteration.

Data Handlers

1. Create Variable

The "Create Variable" action creates a named variable that can be selected by subsequent dynamic actions. Choose Value from Element to capture text from an element, or Fixed Value to store a static value. Save the script before entering the Variable Name.

Inputs:

  • Value Source* — choose Value from Element or Fixed Value.

  • Variable Name* (available after the script is saved)

  • For Value from Element: Locator Type Id and Locator Value*, which is the SAP element ID to read.

  • For Fixed Value: Static Value*.

Create Variable with Fixed Value

To create a variable with a fixed value, select Fixed Value in Value Source, save the script, enter a Variable Name, and provide the value in Static Value.

Create Variable with Value from Element

To capture a value from an element, select Value from Element in Value Source, save the script, and enter a Variable Name. Use Id as the Locator Type and enter the SAP GUI element ID in Locator Value. The framework reads the element's current value; for grid controls, it reads the currently selected cell.

The screenshot shows the shared action editor. In origin/staging, SAP value capture uses the SAP element ID and variable name; the Windows-specific control and window-targeting fields are not used by the SAP driver.

2. Variable From Message

The "Variable From Message" action captures a variable or value from a displayed message and stores it in a user-defined variable.

Inputs:

  • Variable Name*

Variable From Message

3. Dynamic Verify Text

The "Dynamic Verify Text" action uses text captured dynamically by the "Create Variable" action and compares it to the text of a specified element.

Inputs:

  • Locator Type and its Value*

  • Select Variable*

Dynamic Verify Text

4. Dynamic Contains

The "Dynamic Contains" action checks if the text captured by the "Create Variable" action is contained within the text of a specified element.

Inputs:

  • Locator Type and its Value*

  • Select Variable*

Dynamic Contains

5. Dynamic Set

In the "Dynamic Set" action, you can set a text value for a specified element using a variable (value from the Select Variable field) created earlier in the "Create Variable" action.

Inputs:

  • Locator Type and its Value*

  • Select Variable* (Choose a variable created earlier)

Example: Locator Type: "id" Locator Value: "wnd[0]" Selected Variable: Var1 This action will locate the element with the ID 'wnd[0]' in the user interface and set its content to the value stored in the variable Var1.

Dynamic Set

6. Extract Words

The "Extract Words" action retrieves characters from the text stored in the Select Variable field using designated start and end indices provided within the data.

Inputs:

  • Data* (New data to assign to the variable)

  • Select Variable* (Choose the variable to update with the new data)

Example: Var1: HelloWorld Data: 0|8 Updated value of Var1: HelloWor (Starting from the 0th index till the 8th index)

Extract Words

7. Remove Words

The "Remove Words" action removes specified words from the text stored in the Select Variable field.

Inputs:

  • Data* (Words to remove)

  • Select Variable* (Choose the variable to update with the new data)

Example: Var1: Test Test1 Test2 Data: Test Test1 Updated value of Var1: Test2 (Words provided in Data are removed)

Remove Words

8. Modify Dynamic Value

The "Modify Dynamic Value" action dynamically updates the value of a Select Variable field with the text provided in the Data field.

Inputs:

  • Data* (New data to assign to the variable)

  • Select Variable* (Choose the variable to update with the new data)

Example: Var1: Test Data: Var1+" Test1" Updated value of Var1: Test Test1 (Words provided in Data are appended)

Modify Dynamic Value

9. Dynamic Verify Greater Than

This action checks whether the specified element's value is greater than value in variable. This action uses the dynamically captured text from the 'Create Variable' user action in the 'Select Variable' field. There are two value type supported here Date and Number. Format is applicable for Date and is optional. Eg. dd/mm/yyyy hh🇲🇲ss

Inputs:

  • Locator Type*

  • Locator Value*

  • Select Variable*

  • Value Type*

  • Format For Locator’s Value

  • Format For Variable’s Value

DynamicVerifyGreaterThan

10. Dynamic Verify Less Than

This action checks whether the specified element's value is less than value in variable. This action uses the dynamically captured text from the 'Create Variable' user action in the 'Select Variable' field. There are two value type supported here Date and Number. Format is applicable for Date and is optional. Eg. dd/mm/yyyy hh🇲🇲ss

Inputs:

  • Locator Type*

  • Locator Value*

  • Select Variable*

  • Value Type*

  • Format For Locator’s Value

  • Format For Variable’s Value

DynamicVerifyLessThan

Delay

1. Wait

The "Wait" action pauses script execution for a specified amount of time in seconds.

Inputs:

  • Wait Time (seconds)*

Wait

2. Wait For Element

The "Wait For Element" action waits for a specified period of time until the specified element becomes visible in the window.

Inputs:

  • Locator Type and its Value*

  • Timeout (seconds)*

Wait For Element

Window Actions

Window-based actions to control the current window being used in the test.

1. Maximize

The "Maximize" action maximizes the current window.

Inputs:

  • Locator Type and its Value*

Maximize

2. Close

The "Close" action closes the current window.

Inputs:

  • Locator Type and its Value*

Close

3. Connect to Existing SAP Window

Connects the test to an SAP window that is already open, allowing subsequent SAP actions to run against that existing session.

AI Actions

Introducing Qyrus's groundbreaking feature: "AI Actions." Now, effortlessly execute actions by providing a screenshot. With this cutting-edge capability, tasks like UI testing, data validation, and value setting become a breeze. AI Actions allow you to interact with complex controls that might not have an ID or Name.

To use this feature, follow these simple steps:

  1. Capture a screenshot of the element you want to interact with.

  2. Crop the screenshot to include only the relevant part of the element.

  3. In cases of identical visuals, enable the "Multiple Elements" option.

  4. Specify the index value based on the element's position from top-left to bottom-right.

The captured element is the cropped screenshot of the target UI element.

1. Click By Image

The "Click By Image" action performs a click action on the captured element (image uploaded by the user).

Inputs:

  • Image of Control*

  • Index (If multiple elements)

Click By Image

2. Set By Image

The "Set By Image" action sets a value (which can be text) in the text box of the captured element.

Inputs:

  • Image of Control*

  • Data Value*

  • Index (If multiple elements)

Set By Image

3. Verify Visibility By Image

The "Verify Visibility By Image" action verifies the visibility of the element on the current screen.

Inputs:

  • Image of Control*

  • Index (If multiple elements)

Verify Visibility By Image

4. Hover By Image

The "Hover By Image" action performs a hover action on the captured element (image uploaded by the user).

Inputs:

  • Image of Control*

  • Index (If multiple elements)

Hover By Image

With Qyrus's "AI Actions," you can now interact with UI elements using visual recognition, making your automation tasks more powerful and versatile than ever before. Say goodbye to the limitations of traditional automation methods and embrace the future of AI-driven actions.

Other Actions

Explore a wide range of SAP actions to enhance your automation capabilities. These actions allow you to interact with various elements and controls within SAP systems. Whether you need to select items, navigate complex hierarchies, set properties, or execute methods, we've got you covered.

1. Select Combobox Item

Capture text from a specified Combobox control.

Inputs:

  • Locator type and its Value* - Specify how to identify or locate the Combobox control.

  • Property* - Choose which property of the Combobox you want to interact with (e.g., "Index," "Value," or "Key").

  • Property Value* - Enter the value to capture from the Combobox control.

Select Combobox Item

2. Go To Tcode

Navigate to a specific SAP transaction code for a desired task.

Inputs:

  • Tcode* - Specify the SAP transaction code (Tcode) you want to navigate to. Each Tcode represents a specific task or function within SAP.

Go To Tcode

3. Connect SAP System

Establish a connection to an SAP system instance for interaction.

Inputs:

  • Data Value* - Enter the necessary data to establish the connection.

Connect SAP System

4. Selected Rows

Refer to the rows that are currently selected in an SAP table or grid.

Inputs:

  • Locator type and its Value* - Identify the table or grid.

  • Rows* - Specify the number of rows you want to interact with.

Selected Rows

5. Selected Node

Retrieve information about the currently selected node in a tree-like structure.

Inputs:

  • Locator type and its Value* - Identify the tree structure.

  • Node* - Specify the node or item you want to retrieve information about.

Selected Node

6. Make Top Node

Ensure a specific node in a tree control is visible at the top.

Inputs:

  • Locator type and its Value* - Identify the tree control.

  • Node* - Specify the target node.

Make Top Node

7. Double Click Node

Simulate a double-click action on a node in a tree structure to expand or open it.

Inputs:

  • Locator type and its Value* - Identify the tree structure.

  • Node* - Specify the target node.

Double Click Node

8. Select

Select a specific element or item within SAP, such as buttons, checkboxes, input fields, or list items.

Inputs:

  • Locator type and its Value* - Identify the element you want to select.

Select

9. Set Current Cell Row

Set the active or current cell in a specific row, ideal for data entry or extraction in tables or grids.

Inputs:

  • Locator Type* - Specify how to locate the table or grid.

  • Locator Value* - Identify the table or grid.

  • Row Number* - Indicate the row where you want to set the current cell.

Set Current Cell Row

10. Context Menu

Open or interact with the context menu for a particular element.

Inputs:

  • Locator Type* - Specify how to locate the element.

  • Locator Value* - Identify the element with a context menu.

Context Menu

11. Set Focus

Set focus to a specific GUI element, making it active and ready to receive user input.

Inputs:

  • Locator Type* - Specify how to locate the element.

  • Locator Value* - Identify the element to set focus on.

Set Focus

12. Select Interval

In table or grid controls, select a range of rows to perform batch actions.

Inputs:

  • Data Column* - Specify the data column.

  • Locator Type* - Identify the table or grid.

  • Locator Value* - Specify the table or grid element.

Select Interval

13. Check Checkbox

Mark a checkbox as selected or checked.

Inputs:

  • Locator Type* - Specify how to locate the checkbox.

  • Locator Value* - Identify the checkbox element.

Check Checkbox

14. Uncheck Checkbox

Clear a checkbox (uncheck it).

Inputs:

  • Locator Type* - Specify how to locate the checkbox.

  • Locator Value* - Identify the checkbox element.

Uncheck Checkbox

15. Select Row By Index

Choose a specific row within a table or grid control based on its numerical index.

Inputs:

  • Index* - Specify the index of the row you want to select.

  • Locator Type* - Identify the table or grid.

  • Locator Value* - Specify the table or grid element.

Select Row By Index

16. Set Element Property

Dynamically modify properties of a specified element.

Inputs:

  • Locator Type* - Specify how to locate the element.

  • Locator Value* - Identify the element.

  • Property* - Choose the property to modify.

  • Property Value* - Enter the new value for the property.

Set Element Property

17. Invoke Element Method

Execute a specific method associated with a specified element.

Inputs:

  • Locator Type* - Specify how to locate the element.

  • Locator Value* - Identify the element.

  • Argument Value - Provide any required arguments.

  • Method* - Select the method to execute.

Invoke Element Method

18. Expand Node

Open and expand a node within a tree structure to reveal its subnodes or contents.

Inputs:

  • Locator Type* - Specify how to locate the tree structure.

  • Locator Value* - Identify the tree structure element.

  • Node* - Specify the target node to expand.

Expand Node

19. Collapse Node

Collapse or close a node in a tree structure, hiding its subnodes or contents.

Inputs:

  • Locator Type* - Specify how to locate the tree structure.

  • Locator Value* - Identify the tree structure element.

  • Node* - Specify the target node to collapse.

Collapse Node

20. Deselect Row By Index

Remove the selection from a specific row within a table or grid control based on its index.

Inputs:

  • Locator Type* - Specify how to locate the table or grid.

  • Locator Value* - Identify the table or grid element.

  • Index* - Specify the index of the row to deselect.

Deselect Row By Index

21. Selection Index

Retrieve the indices of currently selected items or rows.

Inputs:

  • Locator Type* - Specify how to locate the table or grid.

  • Locator Value* - Identify the table or grid element.

  • Indexes* - Obtain the indices of selected items or rows.

Selection Index

22. Vertical Scroll Position

Determine or adjust the vertical scroll position in a control.

Inputs:

  • Locator Type* - Specify how to locate the control.

  • Locator Value* - Identify the control.

  • Position* - Set the desired vertical scroll position.

Vertical Scroll Position

With these SAP actions at your disposal, you can streamline your automation efforts and tackle a wide range of tasks within SAP systems. Automate with precision and efficiency, saving valuable time and resources.

Last updated