Steer SAP controls

You can steer the following standard controls as described in chapter "Steering Controls":

This chapter describes control steering for SAP specific controls in greater detail.

SAP Calendar

The SAP calendar control allows you to select a date, range of dates, or a week from the SAP calendar. You can scan the SAP calendar control with Tosca XScan.

SAP calendar control

To scan and steer this control, follow the steps below:

  1. Scan the calendar control with Tosca XScan.

  2. Create a TestCase with the scanned Module.

  3. Set the ActionMode of the calendar control to Input.

SAP Calendar Module in a TestCase

  1. In the Value field, insert the correct date format as described in the table below.

Date format

Description

Example

yyyyMMdd

Enter the year, the month, and the day to select a specific day in the calendar.

20190430

yyyyMMdd-yyyyMMdd

Enter the start date and end date to select a range of dates in the calendar.

20190401-20190430

CWxx/yyyy

Enter CW followed by the week number and the year to select a specific week in the calendar.

CW12/2019

SAP ComboBox

The ComboBox control allows you to select an item from a predefined list. A ComboBox is an entry in the ComboBox's dropdown list. Every ComboBox item has a key and a value. A key can be a combination of letters and numbers or just of numbers and a value is an item text.

ComboBox item values

By default, SAP GUI by default displays only values but you can display both keys and values together.

ComboBox item keys and values

Display keys in SAP

To display keys in SAP GUI, follow the steps below:

  1. In SAP GUI, click the Customize Local Layout icon and select Options... from the context menu.

Customize Local Layout context menu

  1. In the Options screen, navigate to Interactive Design->Visualization 1->Controls.

  2. In the Controls area, select the checkbox Show keys within dropdown lists.

Enable Show keys within dropdown list checkbox in SAP GUI

Enable Tosca Commander to identify ComboBox items by keys and values

When you scan an SAP ComboBox, Tosca Commander identifies ComboBox items by their values by default. ComboBox items can share the same value, i.e. values are not uniquely identifiable. You can make ComboBox items identifiable by both keys and values in Tosca Commander. This setting works regardless of whether keys are displayed in SAP GUI or not.

To make ComboBox items identifiable by both keys and values, follow the steps below:

  1. In Tosca Commander, navigate to the Projects tab.

  2. Click Settings.

  3. In the Tosca Settings dialog, navigate to Settings->TBox->Engines->SAP.

  4. Click the Combobox items selectable by its Key row.

  5. Select True from the dropdown list in the Value column.

Enable Tricentis Tosca to identify by both keys and values

When you scan a ComboBox, Tricentis Tosca now shows items in TestCases with both keys and values.

Keys and values in the Value field

If you enable this option in Tosca Commander and scan Modules, TestCases containing these Modules only work properly if this option remains enabled. If you disable it, you need to rescan the Modules.

However, changing this setting in SAP doesn't influence Modules in Tosca Commander.

SAP ContextMenu

To steer SAP context menus, use the Module SAP ContextMenu.

This Module is part of the Standard subset. You can find it under Standard modules->TBox XEngines->Sap.

SAP context menu

Context menus must be open for the SAP Engine 3.0 to steer them. Use image-based test automation to open context menus in trees.

In this example, the SAP Engine 3.0 opens the context menu and selects the entry Insert Unicode control character->Zero width joiner.

SAP context menu: specify the menu path

In this example, the SAP Engine 3.0 opens the context menu and verifies whether the option Zero width joiner exists.

Verify SAP context menu entries

SAP Login

To enter user data into the SAP Login screen, use the Module SAP Login.

This Module is part of the Standard subset. You can find it under Standard modules->TBox XEngines->Sap.

To sign in to SAP with the Module SAP Login, follow the steps below:

  1. Launch the SAP system with the Module SAP Logon.

    This step is a mandatory first step if you want to steer the SAP Login screen.

  2. Create a new TestStep out of the Module SAP Login to enter the required user data.

In this example, you sign in to Client 001 with the user credentials of the user test01.

  • The first TestStep uses the SAP Logon Module to open the SAP system.

  • The second TestStep steers the Login screen. The SAP Engine 3.0 enters the necessary data and confirms with Enter.

Open the SAP system, then steer the Login screen

SAP Logon

To steer the SAP Logon window, use the Module SAP Logon.

This Module is part of the Standard subset. You can find it under Standard modules->TBox XEngines->Sap.

SAP Logon screen with the SID column

In this example, you open the SAP Logon dialog using the connection name.

Open an SAP connection using the connection name

In this example, you open the SAP Logon dialog using the SID.

Open an SAP connection using the SID

SAP Menu

To steer SAP menus, use the Module SAP Menu.

This Module is part of the Standard subset. You can find it under Standard modules->TBox XEngines->Sap.

Alternatively, you can scan SAP menus with Tosca XScan.

In this example, you select the menu entry QuickViewer by entering the path System->Services->QuickViewer.

SAP menu: use the menu path

In this example, you directly select the menu entry QuickViewer.

SAP menu: use the menu entry directly

In this example, the SAP Engine 3.0 verifies that the menu entry System->Services->QuickViewer exists.

SAP menu: verify that the menu entry QuickViewer exists

SAP Multiple Logon

To steer the modal dialog window License Information for Multiple Logon, use the Module SAP Multiple Logon License Warning.

This Module is part of the Standard subset. You can find it under Standard modules->TBox XEngines->Sap.

The modal dialog box License Information for Multiple Logon opens if a user attempts to sign in to the system several times.

You can define the caption of the dialog box in the Properties tab of the Module. To do so, enter the respective Value for the parameter CaptionList. To enter the caption in multiple languages, separate them with semicolons.

In this example, the SAP Engine 3.0 performs the following actions:

  • It continues with the current log-on attempt and terminates any other log-on attempts.

  • It confirms the selection and closes the dialog box.

Steer the License Information for Multiple Logon dialog box

SAP SpecialToolbar

SAP SpecialToolbar is a toolbar with buttons that open context menus.

Context menu of the Total toolbar button

Follow the instructions in this chapter to:

Scan SAP SpecialToolbar

To scan SAP SpecialToolbar, follow the steps below:

  1. Run Tosca XScan and select the SAP window you want to scan.

  2. If you use the Basic View or the Condensed View in Tosca XScan, right-click the table grid and select Toolbar from the context menu. This enables you to scan a toolbar independendtly from its table grid.

    If you use the Advanced View in Tosca XScan, you must enable the Select on screen option first.

Select on Screen context menu options

  1. Save the Module or continue to scan other screens as described in chapter "Select controls in the test object".

Steer SAP SpecialToolbar

To steer SAP SpecialToolbar, follow the steps below:

  1. Scan the SAP SpecialToolbar with Tosca XScan.

  2. Create a TestCase with the scanned module.

  3. In the Value field of the Toolbar control, select the context menu item you want to steer.

Toolbar control in the TestStep

  1. Set the ActionMode to Input.

SAP StatusBar

To verify information on the SAP Status Bar as well as various session information, use the Module SAP Statusbar.

This Module is part of the Standard subset. You can find it under Standard modules->TBox XEngines->Sap.

SAP Status Bar

In this example, you verify whether the type of the status bar message is Success.

Verify SAP Status Bar - MessageType

Scan SAP Status Bars

You can scan the SAP Status Bar with Tosca XScan. For detailed information on scanning Modules with Tosca XScan, see chapter "Scan Modules".

You can verify the following properties via the Value column: 

Property

Description

Message

Verifies the text of the status bar message.

MessageType

Verifies the type of the status bar message.

You can use the following values:

  • Success

  • Warning

  • Error

  • Abort

  • Information

In this example, you use the property Message to verify whether the text of the status bar message is Transaction.

Verify SAP Status Bar - Message

SAP SubToolbar

To steer SAP SubToolbars, use the Module SAP SubToolbar.

This Module is part of the Standard subset. You can find it under Standard modules->TBox XEngines->Sap.

You can also scan SAP SubToolBars with Tosca XScan.

SAP SubToolbar

Define the tooltip text of the SubToolbar button you want to click via the parameter SubToolBar.

If a tool-tip text of a SubToolbar button contains nodes ->, Tricentis Tosca recognizes it as an entry path. To change this behavior, you can use wildcard characters *.

Label that contains nodes

Wildcard characters in SAP SubToolBar TestStep

In this example, the SAP Engine 3.0 steers the Create role button in the SAP SubToolbar.

Steer an SAP SubToolbar

SAP Table

You can scan SAP tables and SAP grid views with Tosca XScan, and steer them as described in chapter "Table".

If one control is defined in a cell, you can steer it. If more than one control is defined, you can embed the controls in the cell of a table. For detailed information on defining controls in cells, see chapter "Defining controls in cells".

SAP Table

Tricentis Tosca supports the following click operations along with the ActionMode Input:

Click operation

Description

{SELECT}

Selects the specified row, column, or table.

{ADDSELECT}

Selects the specified row or column while any existing selections remain unchanged.

{DESELECT}

Deselects the specified row or column while any existing selections remain unchanged.

In the example below, you select the second row of the Project Overview table.

Select a table row

Tricentis Tosca supports the selection of a whole SAP table or grid view, when the SAP Toolbar provides the function Select All.

SAP Table Toolbar: Select All

In the example below, you select the whole table Content Repository.

Select the whole table

Verify the traffic light value of a node

Tables may include a traffic light status that you can verify with the ActionMode Verify. To do so, follow the steps below:

  1. Create a TrafficLight control in the Module as described in chapter "Defining controls in cells".

  2. Select the traffic light color to be verified in the corresponding TestStepValue.

    The following values are possible: Green, Yellow, Red.

  3. Set the ActionMode to Verify.

In this example, you verify whether the traffic light value of the first data row is Green.

Traffic light status in SAP

Verify the traffic light status

SAP TableTree

You can scan SAP TableTrees with Tosca XScan.

SAP TableTree

You can steer the respective entries in the following ways:

  • Specify a path

  • Select the items directly via the tree items

To steer the table tree, set the ActionMode to Select for the TableTree control. If you enter the path, separate the nodes with ->. If you select the items directly, you must use the ActionMode Select for all items that are located hierarchically above of the selected item.

To select the cell of a TableTree item, enter the name of its column into the Name column.

To steer controls within cells, you have to create embedded controls (see chapter "Defining controls in cells").

In the example below, Tricentis Tosca selects the entry Workbench Demos->Controls->Picture Controls->Screen display and buffers the value of the cell in the column Report/Transaction into the buffer ColumnName.

Buffer a TableTree entry via items

Buffer a TableTree entry via the path

When you use the ActionMode Constraint on a TableTree, Tricentis recommends that you use the $ sign to define a parameter such as a ColumnName or ColumnNumber.

If you use the # sign, Tricentis Tosca only returns the occurrence which matches the ordinal number specified.

For instance, #3 returns only the third occurrence of cells containing this parameter. $3 returns the first, second and third occurrences of cells that contain the parameter.

Copy cell paths from Content View in XScan

You can copy cell paths for SAP TableTrees to simplify the creation of TestCases. To do so, follow the steps below:

  1. Scan the TableTree using XScan.

SAP TableTree

You can now view the cell path of the TableTree in Content View.

Copy inline path to clipboard option in Content View

  1. In Content View, click on Copy inline path to clipboard.

  2. In the subsequent dialog, click OK to confirm that Tricentis Tosca has copied the information to the clipboard.

Cell path copied notification message

You can now paste the cell path.

Cell path in a TestStep

Verify the traffic light value of a node

SAP TableTrees may include a traffic light status that you can verify with the ActionMode Verify. To do so, follow the steps below:

  1. Create a TrafficLight control in the Module as described in chapter "Defining controls in cells".

  2. Select the traffic light color to be verified in the corresponding TestStepValue.

    The following values are possible: Green, Yellow, Red.

  3. Set the ActionMode to Verify.

Identify columns by the name

You can identify a column of a table tree via its name instead of its caption. To do so, use the steering parameter IdentifyColumnsByName

The steering parameter is created when you scan the control. You can edit it via the XScan Identify By Properties grid in the Steering section. 

To steer columns by name instead of their caption, you must set the steering parameter to True.

SAP Toolbar

You can scan SAP Toolbars with Tosca XScan. You can also scan and steer SAP Toolbars that contain context menus. To do so, follow the steps described in chapter "SAP SpecialToolbar".

To steer the SAP Toolbar that contains the transaction code field, use the Module SAP Toolbar.

This Module is part of the Standard subset. You can find it under Standard modules->TBox XEngines->Sap.

SAP Toolbar with transaction code field

In this example, you search for transaction code RZ11.

Search for a transaction code

SAP TreeView

To steer the SAP TreeViews, use the Module SAP TreeView.

This Module is part of the Standard subset. You can find it under Standard modules->TBox XEngines->Sap.

You can also scan SAP TreeViews with Tosca XScan.

SAP TreeView

In this example, the SAP Engine 3.0 opens the menu entry SDCCN - Service Data Control Center via double-click.

Steer SAP TreeView