Steer SAP Fiori controls

With the SAP Web Extension 3.0, you can steer controls in SAP Fiori. This chapter describes how to steer controls specific to SAP Fiori.

The table below lists SAP Fiori controls that you can steer with the SAP Web Extension 3.0.

Business name of SAP Fiori controls

Identified in XScan as

Button

Button

Check Box

CheckBox

Column, Grid Table

Table

ComboBox

ComboBox

Composite Controls, Header, Label, Object Attribute, Object Number, Object Status, Text

Label

Container

Container

Generic Tile

Button

You can also use the Module SAP Tile to steer the Generic Tile.

Icon, Image

Image

Input

TextBox

Link

Link

List

Listbox

List with Selection, Icon Tab Bar, Object List Item

Listbox

Message Toast

Container

You can also use the Module SAP Message Toast to steer the Message Toast.

Object Header

Container

Radio Button

RadioButton

Search Field

TextBox

Text Area

TextBox

Weekly Calendar

ListView

SAP Fiori Column

Tosca XScan identifies SAP Fiori Column as Tables. You can steer them as described in chapter "Table".

SAP Fiori Column

Verify the elements of the Column

The table below lists the properties that you can verify with the Value column.

Property

Description

Unit

Verifies the unit.

LabelTitle

Verifies the title of the label.

LabelText

Verifies the text of the label.

LabelStatus

Verifies the status of the label.

Possible values: Success, Error, Warning, None.

In this example, you verify the following elements:

  • You verify the first row of the column Product. You use the property LabelTitle to verify whether its name is Deskjet Super Highspeed.

  • You verify the first row of the column Weight. You use the property Unit to verify whether its name is g.

  • You verify the first row of the column Weight. You use the property LabelStatus to verify whether its status is Success.

Verify SAP Fiori Columns

SAP Fiori Composite Controls

Tosca XScan identifies SAP Fiori Composite Controls as Labels. You can steer them as described in chapter "Label"

SAP Fiori Composite Controls can consist of the following types of information:

SAP Fiori Composite Controls

Verify the text information of SAP Fiori Composite Controls

The table below lists the properties that you can verify with the Value column for text information.

Property

Description

Caption

Verifies the text in the left column.

LabelText

Verifies the text in the right column.

SAP Fiori Composite Control with text information

In this example, you verify the text in the right column of the label Shipping Point. You use the property LabelText to verify whether its text is Shipping Point 1010.

Verify the text in SAP Fiori Composite Control

Verify the status information of SAP Fiori Composite Controls

The table below lists the properties that you can verify with the Value column for status information.

Property

Description

Caption

Verifies the text in the left column.

LabelText

Verifies the text in the right column.

LabelStatus

Verifies the status in the right column.

Possible values: Success, Error, Warning, None.

SAP Fiori Composite Control with status information

In this example, you verify the following elements:

  • You verify the text in the right column of the label Data for Delivery. You use the property LabelText to verify whether its text is Partially.

  • You verify the status in the right column of the label Data for Delivery. You use the property LabelStatus to verify whether its status is Warning.

Verify the status in the SAP Fiori Composite Control

Verify the text and status information of SAP Fiori Composite Controls

The table below lists the properties that you can verify with the Value column when both text and status information applies.

Property

Description

Caption

Verifies the text in the left column.

Status

Verifies the status in the right column.

Possible values: Success, Error, Warning, None.

StatusText

Verifies the text of the status in the right column.

Text

Verifies the text and the value of the status in the right column.

SAP Fiori Composite Control with text and status information

In this example, you verify the following elements:

  • You verify the status in the right column of the label Transportation Planning Date. You use the property Status to verify whether the status is None.

  • You verify the status text in the right column of the label Planned Picking Date. You use the property StatusText to verify whether the text of the status is Not yet picked.

  • You verify the text and status in the right column of the label Planned Shipping Date. You use the property Text to verify whether the text is 07.12.2015 and the status is Not yet started.

Verify the text and status in SAP Fiori Composite Controls

SAP Fiori Container

Tosca XScan identifies SAP Fiori Containers as Containers.

Verify the elements of SAP Fiori Containers

The table below lists the properties that you can verify with the Value column.

Property

Description

ContainerTitle

Verified the title of the container.

DefaultName

Verifies the default name of the container.

In this example, you use the property ContainerTitle to verify whether the title of the Container is Delivery and Shipping.

Verify the title of SAP Fiori Container

SAP Fiori Generic Tile

Use the Module SAP Tile from the Standard subset to click a tile on the SAP Fiori dashboard page.

You can find the Module under Standard modules->TBox XEngines->Html->SAP FIORI.

In this example, the SAP Web Extension 3.0 clicks a specific SAP Fiori Generic Tile from Sales Orders category.

Sales Orders category with Sales Order Fulfillment tile

To do so, you specify the following ModuleAttributes:

  • Tile Category to ensure that the tile in Sales Orders category is clicked.

  • Tile Title to specify the title of the tile you want to click.

  • Tile Subtitle, because there are three Sales Order Fulfillment tiles in Sales Orders category.

Click Sales Order Fulfillment tile in SAP Fiori

If you have multiple tabs open in your browser, you must specify which tab contains the elements that you want to steer. To do so, follow the steps below:

  1. Copy the Module SAP Tile. This ensures that your changes in the Module properties don't affect the existing TestCases.

  2. Select the copied Module.

  3. To access the Module properties, click on Properties or the arrow on the right side of the workspace window.

  4. Navigate to the parameter Title.

  5. In the Value column, replace the asterisk * with the name of the tab where you want to steer SAP Fiori Generic Tile, for example Home.

    Alternatively, you can enter a buffered value that you have previously set using the standard Module TBox SetBuffer.

Title parameter of the Module SAP Tile

Verify SAP Fiori Generic Tiles

To verify a tile on the SAP Fiori dashboard page, scan it with Tosca XScan.

Tosca XScan identifies SAP Fiori Generic Tiles as Buttons. You can steer them as described in chapter "Button".

SAP Fiori Generic Tile My Inbox

The table below lists the properties that you can verify with the Value column.

Property

Description

TileTitle

Verifies the title of the tile.

TileSubtitle

Verifies the subtitle of the tile.

Info

Verifies the text of the tile footer.

Icon

Verifies the name of the tile icon.

TargetURL

Verifies the URL that is linked to the website.

Number

Verifies the number on the tile.

NumberState

Verifies the number's state.

Possible values: Neutral, Positive, Negative, Critical, None.

In this example, you verify whether the title of the tile is My Timesheet.

Verify the title of an SAP Fiori Generic Tile

After the execution of TestCases with SAP Fiori Generic Tiles, the following error message can appear: 

Control for action Aging Analysis is not visible

It's caused by the fact that sometimes SAP Fiori Generic Tiles don't load fast enough.

Tiles with lazy loading

To avoid this, you can add a step with the ActionMode WaitOn before the execution of the click operation.

In this example, you use the property Enabled to wait until SAP Fiori Generic Tile Create Sales Order is fully loaded.

Solution for error during loading of SAP Fiori Generic Tiles

SAP Fiori Grid Table

Tosca XScan identifies SAP Fiori Grid Tables as Tables. You can steer them as described in chapter "Table".

SAP Fiori Grid Table

Select rows in SAP Fiori Grid Tables

You can select one or more rows in SAP Fiori Grid Table. To do so, follow the steps below:

  1. Scan a SAP Fiori Grid Table with Tosca XScan.

  2. Drag and drop the Module onto your TestCase.

  3. In the Name field of the <Row> attribute, enter the number of the row you want to select. For example, enter $5 to select the fifth row (see chapter "Table").

  4. Under the <Row> attribute, set the index of the <Cell> attribute to $1. This selects the first column, which is necessary to select rows.

Tricentis recommends that you use the index number of the first column instead of its name.

  1. Set the Value of the Cell attribute to select or deselect the row:

    • To select a row, set the Value to True or Click.

    • To deselect a row, set the Value to False.

  2. Set the ActionMode to Input.

In this example, you select the fifth row of SAP Fiori Grid Table. To do so, you select the cell $1 for the row $5 and set the Value for this cell to True.

Select a row from SAP Fiori Grid Table

Verify the elements of SAP Fiori Grid Table

The table below lists the properties that you can verify with the Value column.

Property

Description

Currency

Verifies the abbreviation of a currency in the cell, for example USD or EUR.

CurrencySymbol

Verifies the symbol of the currency in the cell, for example $ or .

DisplayedCurrency

Verifies the abbreviation or the symbol of a currency in the cell, for example USD, $, EUR, .

LabelStatus

Verifies the status of the cell.

Possible values: Success, Error, Warning, None.

Value

Verifies the value in the cell.

In this example, you verify the following elements:

  • You verify the first row of the column Price. You use the property Value to verify whether it's 856.49.

  • You verify the first row of the column Price. You use the property DisplayedCurrency to verify whether the symbol is .

Verify the Price column

Define controls in cells in SAP Fiori Grid Tables

SAP Fiori Grid Table can contain the following elements:

  • Button

  • CheckBox

  • ComboBox

  • Link

  • Image

  • TextBox

  • Label

  • Data Picker

To steer these elements, follow the steps below:

  1. Right-click on the cell of a row or column attribute in the Module.

  2. Select Create Embedded <Control-Type> control from the context menu.

Add an embedded control

For detailed information, see chapter "Defining controls in cells".

SAP Fiori Header

Tosca XScan identifies SAP Fiori Headers as Labels. You can steer them as described in chapter "Label".

SAP Fiori Headers consist of the following elements:

  • Intro

  • Caption

  • The list of attributes

  • Number with number state and unit

  • Number unit

  • First status with status state

  • Second status with status state

Elements of SAP Fiori Header

Verify the elements of SAP Fiori Header

The table below lists the properties that you can verify with the Value column.

Property

Description

Attributes

Verifies the list of attributes at the bottom of the header.

Caption

Verifies the caption in the header.

Intro

Verifies the intro in the header.

Number

Verifies the number in the header.

NumberState

Verifies the number state in the header.

NumberUnit

Verifies the number unit in the header.

StatusFirstState

Verifies the state of the first status in the header.

Possible values: Success, Error, Warning, None.

StatusFirstText

Verifies the text of the first status in the header.

StatusSecondState

Verifies the state of the second status in the header.

Possible values: Success, Error, Warning, None.

StatusSecondText

Verifies the text of the second status in the header.

Unit

Verifies the unit of elements in the header.

In this example, you verify the Net Order Value. You use a regular expression to verify that the value 175,50 is at the end of the line.

SAP Fiori Header example

Use the following general syntax to verify the attribute through a regular expression: Attribute == {RegEx[<Regular expression>]}.

For more information on regular expressions, see chapter "Regular expressions".

Regular expression for the verification of Attributes

Steer more than one element of SAP Fiori Header

You can steer more than one element of SAP Fiori Header. To do so, follow the steps below:

  1. To open the Properties pane, click the Properties button or expand the arrow on the right side of the workspace window.

  2. Change the value of Cordinality in the Value column.

    For an infinite number of steerable header elements, change the default value from 0-1 to 0-n.

Cardinality of the Header

SAP Fiori Icon Tab Bar

Tosca XScan identifies SAP Fiori Icon Tab Bars as Listboxes. You can steer them as described in chapter "Listbox".

SAP Fiori Icon Tab Bar

In this example, you click on the Icon Tab Bar item Heavy.

Steer SAP Fiori Icon Tab Bar

Verify the elements of SAP Fiori Icon Tab Bar

The table below lists the properties that you can verify for each Icon Tab with the multiline view.

Property

Description

Counter

Verifies the number on the Icon Tab.

Text

Verifies the name of the Icon Tab.

In this example, you verify whether the number on the Icon Tab Bar item Heavy is 5.

Verify the Counter on the Icon Tab

SAP Fiori Input

You can steer SAP Fiori Inputs as described in chapter "TextBox".

Use the click operation {OpenList} to open Inputs that have an input assistant.

SAP Fiori Input with input assistant

In this example, you open the input assistant of an Input.

Open the input assistant

SAP Fiori List with Selection

Tosca XScan identifies List with Selection as a Listbox. You can steer it as described in chapter "Listbox".

SAP Fiori List with Selection

To steer check boxes in an SAP Fiori List with Selection, follow the steps below:

  1. Create generic list items as described in chapter "Creating generic list items".

  2. Select a check box that you want to steer from the Name column of the list item.

  3. Use the property Selected to select, deselect, or verify the check box:

    • To select the check box, set the property Selected to True and the ActionMode to Input.

    • To deselect the check box, set the property Selected to False and the ActionMode to Input.

    • To verify if the check box is selected or deselected, set the property Selected to True or False and the ActionMode to Verify.

In this example, you use the value True to select the check box Normal Items.

After that, you use the value False to verify whether the other check boxes are deselected.

SAP Fiori List with Selection: select and verify check boxes

SAP Fiori Message Toast

Tosca XScan identifies SAP Fiori Message Toast as Containers.

SAP Fiori Message Toast

Verify the elements of SAP Fiori Message Toast

Use the Module SAP Message Toast from the Standard subset to verify the following properties:

Property

Description

DefaultName

Verifies the default name of the Message Toast.

MessageToastText

Verifies the text in the Message Toast.

In this example, you verify whether the text in the Message Toast is _button*Pressed.

Verify the text in the SAP Fiori Message Toast

SAP Fiori Object List Item

Tosca XScan identifies SAP Fiori Object List Items as Listboxes. You can steer them as described in chapter "Listbox".

SAP Fiori Object List Items

You can locate the elements in the Object List Items on the image in chapter "SAP Fiori Header".

Verify the elements of SAP Fiori Object List Item

The table below lists the properties that you can verify with the Value column.

Property

Description

Attributes

Verifies the list of attributes at the bottom of the header.

Caption

Verifies the caption in the header.

Intro

Verifies the intro in the header.

Number

Verifies the number in the header.

NumberState

Verifies the number state in the header.

NumberUnit

Verifies the number unit in the header.

StatusFirstState

Verifies the state of the first status in the header.

Possible values: Success, Error, Warning, None.

StatusFirstText

Verifies the text of the first status in the header.

StatusSecondState

Verifies the state of the second status in the header.

Possible values: Success, Error, Warning, None.

StatusSecondText

Verifies the text of the second status in the header.

Unit

Verifies the unit of elements in the header.

In this example, you verify the following elements of the Object List Item Products:

  • You use the property Number to verify whether the item Gladiator MX shows the number 100.

  • You use the property NumberState to verify whether the item Gladiator MX shows none.

  • You use the property NumberUnit to verify whether the item Power Projector 4713 shows EUR.

Verify SAP Fiori Object List Item

SAP Fiori Search Field

Tosca XScan identifies SAP Fiori Search Fields as TextBoxes. For information on how to steer them, see chapter "TextBox".

SAP Fiori Search Field

In addition to text, the SAP Fiori Search Field contains two buttons: Clear and Search. To steer them, add the following values in the Value column of the Search Field control:

  • To clear the content of the Search Field, enter {CLEAR}.

  • To click the Search button, enter {ENTER}.

In this example, you perform the following actions:

  • In the TestStep Add text, you enter Sample text into the Search Field.

  • In the TestStep Clear text, you clear the Sample text from the Search Field.

  • In the TestStep Add text, you enter Sample text 2 into the Search Field.

  • In the TestStep Start search, you click on the Search button to start the search.

Steer SAP Fiori Search Field

SAP Fiori Weekly Calendar

Tosca XScan identifies the SAP Fiori Weekly Calendar as a ListView.

SAP Fiori Weekly Calendar

Enter date into SAP Fiori Weekly Calendar

Use the drop-down menu in the Value column to specify the day you want to select.

The table below lists the properties that you can use to steer SAP Fiori Weekly Calendar.

Property

Description

{PrevWeek}

Clicks the left navigation arrow to show the previous week.

{NextWeek}

Clicks the right navigation arrow to show the next week.

{ClearSelectedDates}

Clears the selection of one or more days.

CurrentDate

Specifies the current date.

In this example, you select the 19th in the calendar.

Select a date

In this example, you click the navigation arrow to show the next week of the calendar.

Go to the next calendar week

In this example, you enter the date 24.01.2017. To do so, you specify the current date and add 365 days to it.

Enter a date

Verify the elements of SAP Fiori Weekly Calendar

The table below lists the properties that you can verify with the Value column.

Property

Description

DefaultName

Verifies the technical ID of the calendar, for example WEEKLY_CALENDAR.

CurrentDate

Verifies the current date (default property).

SelectedCount

Verifies the number of selected days.

Selected

Verifies whether the specified day is selected or not.

CurrentDay

Verifies whether the current day is selected or not.

NormalDay

Verifies whether the selected day is a work day or not.

NonWorkingDay

Verifies whether the selected day is a day of rest or not.

SubmittedDay

Verifies whether an entry exists for the specified day.

ApproverActionNeeded

Verifies whether an entry has already been approved for the specified day.

Rejected

Verifies whether an entry has been rejected for the specified day.

ActionRequired

Verifies whether a specific request has already been processed for the specified day or not.

In this example, you verify the current date.

Verify the current date