Steer SAP Fiori controls
With SAP Web Extension 3.0, you can steer controls in SAP Fiori. This chapter describes how to steer controls specific to SAP Fiori.
For instructions on how to steer standard controls that appear in SAP Fiori, see chapter "Steering Controls":
SAP Fiori CheckedListBox
Tosca XScan identifies CheckedListBoxes as ListBoxes. You can steer them as described in chapter "Listbox".
SAP Fiori CheckedListBox
To steer check boxes in an SAP Fiori CheckedListBox, follow the steps below:
-
Create generic list items as described in chapter "Creating generic list items".
-
Select a check box that you want to steer from the Name column of the list item.
-
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 CheckListBox: select and verify check boxes |
SAP Fiori ColumnList
Tosca XScan identifies SAP Fiori ColumnLists as Tables. You can steer them as described in chapter "Table".
SAP Fiori ColumnList
Verify the elements of the ColumnList
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:
Verify SAP Fiori ColumnLists |
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:
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:
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 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:
-
To open the Properties pane, click the Properties button or expand the arrow on the right side of the workspace window.
-
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 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:
-
Scan a SAP Fiori Grid Table with Tosca XScan.
-
Drag and drop the Module onto your TestCase.
-
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").
-
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. |
-
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.
-
-
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:
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:
-
Right-click on the cell of a row or column attribute in the Module.
-
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 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
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 Heavy is 5.
Verify the Counter on the Icon Tab |
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
Tosca XScan identifies SAP Fiori Object Lists 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 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 Products:
Verify SAP Fiori Object List items |
SAP Fiori Tab Panel
Tosca XScan identifies SAP Fiori Tab Panels as ComboBoxes. You can steer them as described in chapter "ComboBox".
SAP Fiori Tab Panel
In this example, you perform the following actions:
Verify SAP Fiori Tab Panel |
SAP Fiori TextBox
You can steer SAP Fiori TextBoxes as described in chapter "TextBox".
Use the click operation {OpenList} to open TextBoxes that have an input assistant.
SAP Fiori TextBox with input assistant
In this example, you open the input assistant of a TextBox.
Open the input assistant |
SAP Fiori Tile
To verify and steer a tile on SAP Fiori dashboard page, scan it with Tosca XScan.
Tosca XScan identifies SAP Fiori Tiles as Buttons. You can steer them as described in chapter "Button".
SAP Fiori 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 Tile |
After the execution of TestCases with SAP Fiori 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 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 Tile Create Sales Order is fully loaded.
Solution for error during loading of SAP Fiori Tiles |
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 |