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.
2. Kill EXE
This action terminates the specified .exe.
Inputs:
EXE Path* – Path to the .exe to be terminated.
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*
Mouse Events
1. Click
This action simulates a mouse click on the specified element.
Inputs:
Locator Type*
Locator Value*
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)
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]"
4. Double Click By Coordinates
This action performs a double click at the specified coordinates (x, y).
Inputs:
Coordinates Value* - (x, y)
5. Right Click By Coordinates
This action performs a right click at the specified coordinates (x, y).
Inputs:
Coordinates Value* - (x, y)
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*
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*
3. Send Keys
This action simulates keyboard input by sending actual keyboard keys as they are.
Inputs:
Keys*
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.
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*
2. Contains
This action verifies whether the specified element contains the text specified in the data field.
Inputs:
Locator Type*
Locator Value*
Data Value*
3. Is Blank
This action verifies whether the specified element's text is blank or not.
Inputs:
Locator Type*
Locator Value*
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.
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:mm:ss
Inputs:
Locator Type*
Locator Value*
Data Value*
Value Type*
Format For Locator’s Value
Format For Data
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:mm:ss
Inputs:
Locator Type*
Locator Value*
Data Value*
Value Type*
Format For Locator’s Value
Format For Data
7. Verify Not Null
This action checks whether the specified element's value is not null.
Inputs:
Locator Type*
Locator Value*
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 .
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*
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.
Data Handlers
1. Create Variable
The "Create Variable" action captures text from a specified element and stores it in a variable with a user-defined name. This variable (data column) can then be used in subsequent data handler actions.
Inputs:
Variable Name*
Locator Type and its Value*
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*
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*
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*
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.
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)
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)
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)
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:mm:ss
Inputs:
Locator Type*
Locator Value*
Select Variable*
Value Type*
Format For Locator’s Value
Format For Variable’s Value
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:mm:ss
Inputs:
Locator Type*
Locator Value*
Select Variable*
Value Type*
Format For Locator’s Value
Format For Variable’s Value
11. Execute Query
Executes a database query and stores the resulting response in a designated variable. Applicable when a database connection is pre-configured.
Inputs:
Query* - SQL query to be executed against the configured database.
Data Column* - Name of the variable to store query results.
Key Extractor* - Specific column to be extracted from the query results.
Prerequisites:
Database configuration must be set up before using this user action.
Non-Parameterization Flow:
Create database configuration in project setup.
Select 'Execute Query' user action.
Enter SQL query in Query field.
Specify Data Column for storing results.
Define Key Extractor for extracting specific column data.
Select database configuration before test run.
Example:
SELECT * FROM newdata WHERE id = 2
Parameterization Flow:
Initial Configuration
When parameterization is activated, the Query field is hidden.
Two fields remain visible:
Data Column (to store results)
Key Extractor (to extract specific column data).
Parameter File Setup
Navigate to the Parameter File.
Click Create Table to generate a TDM test table.
Test Case Creation
The TDM table includes a default column named Test Case (e.g., TC1, TC2).
Data Column field added as second column (e.g., Variable) to store SQL queries.
Query Parameterization
Populate the Variable column with your SQL queries.
Example table structure:
Avoid mixing queries that select different columns on TDM table: If TC1 extracts firstname
and TC2 extracts lastname
, execution may terminate unexpectedly.
Always specify single column in the Key Extractor field.
Integration: Can be combined with "Dynamic Set" to reuse retrieved data in test scenarios.
Delay
1. Wait
The "Wait" action pauses script execution for a specified amount of time in seconds.
Inputs:
Wait Time (seconds)*
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)*
Window Actions
Window-based actions to control the current window being used in the test.
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:
Capture a screenshot of the element you want to interact with.
Crop the screenshot to include only the relevant part of the element.
In cases of identical visuals, enable the "Multiple Elements" option.
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)
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)
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)
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)
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
14. Uncheck Checkbox
Clear a checkbox (uncheck it).
Inputs:
Locator Type* - Specify how to locate the checkbox.
Locator Value* - Identify the checkbox element.
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.
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.
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.
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.
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.
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.
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.
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.
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