Standard test steps

Standard test steps are only available in the old version of Tosca Cloud.

Standard test steps are a set of pre-built test steps for various useful tasks and actions that Tosca Cloud delivers out-of-the-box. Use them to design your test case faster and easier.

This topic lists all standard test steps that Tosca Cloud provides, grouped by type.

Browser actions

Browser actions are a special type of window action for web browser windows or tabs. The default browser is Google Chrome. If you want to use a different browser, add a parameter to your test case; you need to use the special task parameter Browser.

Close tab

Closes all tabs that match the specified browser tab title. There has to be at least one matching tab. It doesn't have to be active, but it must be open otherwise the test step fails.

Value

Description

Browser tab title

Title of the browser window that you want to close.

The title is case-sensitive and must match exactly. You can also use wildcards.

To view the title of a window, hover over the window preview in the taskbar. Typically, a window title consists of the file name, dash, and the application name, for example Test.txt – Notepad.

Use an asterisk * to match any title. This is useful if you simply want to match the only browser tab that's currently open.

If you don't specify a title, Tosca Cloud closes all current tabs.

Open URL

Opens the specified web address.

Value

Description

URL

The web address to open.

Use active tab

True loads the URL in the currently active tab.

False opens the URL in a new tab.

Reload page

Reloads the page on the specified tab from cache, just like pressing F5.

Value

Description

Browser tab title

Title of the browser window that you want to reload.

The title is case-sensitive and must match exactly. You can also use wildcards.

Use an asterisk * to match any title. This is useful if you simply want to match the only browser tab that's currently open.

Run JavaScript

Runs JavaScript code on the specified browser tab.

Value

Description

Browser tab title

Title of the browser window to execute the code on.

The title is case-sensitive and must match exactly. You can also use wildcards.

Use an asterisk * to match any title. This is useful if you simply want to match the only browser tab that's currently open.

JavaScript

The JavaScript code that you want to run.

If your code contains any special characters, you must escape them.

 

Find the browser tab whose title starts with Tricentis and redirect it to https://demowebshop.tricentis.com.

Run JavaScript code on a browser tab

Define variable

Creates a variable and sets it to the specified value at runtime. You can reuse the variable value within the same test case.

Value

Description

Variable name

The name of your variable.

Make sure that the name of the variable is not the same as any custom parameter you've created for the test case.

Value

The value that the variable should provide wherever you reference it in a test case.

This gives a static value to your variable. If you need a dynamic value which depends on the content or state of a control at runtime, create your variable with action type Output or Verify instead.

Evaluate expression

Verifies whether an expression is true or false. Use this test step to perform a comparison or evaluate a mathematical formula.

You can use any of the supported operators in the expression.

Verify if the numerical value of variable Number is smaller than 100.

Evaluate expression: simple comparison of a variable value against a number

Verify if the value of variable A is 100 and at the same time if the value of variable B is different from 10.

Evaluate expression: composed comparison using a logical operator

File actions

File actions allow you to handle files within the Microsoft Windows file system.

Copy

Creates a copy of the specified file under a different name or in a different directory.

Value

Description

Source file

Full path to the file you want to copy. Example: C:\Reports\new_report.xml

Target directory

Full path to the directory where you want to paste the file. Example: C:\Final Reports

This directory must already exist at runtime. You can create it manually, or with the standard test step Folder: Create.

Target file

File name of the copied file. Example: final_report.xml

If the target directory is the same as source directory, then target file name must be different from source file name.

Overwrite

Specifies what to do if the target file already exists:

True silently overwrites the file.

False ensures no overwrite. In that case, the test step fails.

Create

Creates a new file with the specified text content in the specified directory.

Value

Description

Directory

Full path to the directory where you want to create the file. Example: C:\Temp

This directory must already exist at runtime. You can create it manually, or with the standard test step Folder: Create.

File

Name of the new file, including extension. Example: test.txt

Text

Text contents of the new file.

You can provide the contents directly in the field, or use a variable value.

If you provide the contents directly and the text contains any special characters, you must escape them.

Encoding

Character encoding of the new file.

Overwrite

Specifies what to do if the file already exists:

True silently overwrites the contents of the file.

False ensures no overwrite. In that case, the test step fails.

Add byte order mark

Specify whether you want to add a byte order mark (BOM) to the preamble of your file.

This is optional and only applies to files with UTF-8 or UTF-16 encoding.

Delete

Deletes the specified file. The test step succeeds even if the file doesn't exist and there is nothing to delete.

Value

Description

Directory

Full path to the directory that contains the file to delete. Example: C:\Temp

File

Name of the new file, including extension. Example: test.txt

Verify existence

Verify it doesn't exist succeeds if Tosca Cloud doesn't find the file.

Verify it exists succeeds if Tosca Cloud finds the file.

Value

Description

Directory

Full path to the directory that Tosca Cloud should check. Example: C:\Temp

File

Name of the file, including extension. Example: test.txt

WaitOn

Keeps verifying the existence of the specified file within a time limit:

WaitOn until doesn't exist succeeds if Tosca Cloud doesn't find the file within the given time.

WaitOn until exists succeeds if Tosca Cloud finds the file within the given time.

The default wait time is 20 seconds. If you need more or less time, add a parameter to your test case; you need to use the special task parameter SynchronizationTimeoutDuringWaitOn.

Value

Description

Directory

Full path to the directory that Tosca Cloud should check. Example: C:\Temp

File

Name of the file, including extension. Example: test.txt

Files: Compare

Compares two files. The test step succeeds if the contents of those files are identical.

Value

Description

File 1 path

Full path to the first file, including file name and extension. Example: C:\Reports\report_1.xml

File 2 path

Full path to the second file. Example: C:\Reports\report_2.xml

Folder: Create

Creates a new folder in the specified location on your local Microsoft Windows file system.

Value

Description

Path

Full path and name of the folder you want to create. Example: C:\Temp\Reports

The path can have any depth. If some of the folders within the path don't exist already, Tosca Cloud creates them too.

Overwrite

Specifies what to do if the folder already exists:

True silently overwrites the folder with a new, empty folder. This deletes any existing files in the folder.

False ensures no overwrite. In that case, the test step fails.

Images: Compare

Compares two images. The test step succeeds if the images are identical.

Supported image formats are BMP, JPG, PNG, and GIF (including animated).

Value

Description

File 1 path

Full path to the first image, including file name and extension. Example: C:\Images\logo.jpg

File 2 path

Full path to the second image. Example: C:\Images\logo_new.jpg

Keyboard commands

Simulates pressing keys on a keyboard in the specified window, which allows you to type text or send keyboard commands.

Value

Description

Window title

Title of the window where you want to send the key presses.

The title is case-sensitive and must match exactly. You can also use wildcards.

Tosca Cloud brings the window to the foreground.

Keys

The keys that you want to send to the window. You can send:

  • Single key commands and key combinations.

    Tosca Cloud uses the WinForms function SendKeys. For the complete list of supported commands and their syntax, see the Microsoft SendKeys documentation (opens in new tab).

    Single key command examples: {ENTER}, {TAB}, {BACKSPACE}

    Key combination examples:

    Shift + F5 combination: +"{F5}"

    Ctrl + A combination: ^a

    Alt + Shift combination: %+

  • Text strings.

    If the string contains any special characters, you must escape them.

    Note that if you activate CAPS LOCK on your machine, Tosca Cloud sends the keys inverted. For example, if you want to send Abc and have CAPS LOCK on, Tosca Cloud sends aBC.

  • Variable values.

Send a combination of key presses to a Notepad file test.txt:

  • Type Hello, people!.

  • Use the Ctrl+A command ^a to select all text.

  • Delete the text with "{DEL}".

  • Type a new string Hello, world!.

  • Use the Ctrl+W command ^w to save the changed file.

  • Use the Alt+F4 command %"{F4}" to close the Notepad window.

Send a key combination to a Notepad window

Start application

Launches the specified application or script.

Value

Description

Path Full path to the application you want to start, including name and extension of the executable. Example: C:\Windows\notepad.exe
Directory

Working directory for the application.

By default, Tosca Cloud uses the home directory of the registered user at C:\Documents and Settings\<user name>.

Arguments If you want to start or stop the application with arguments, just as you would in a command line, specify them here. You can use more than one.
Maximum time to exit [s]

Application timeout in seconds. If the time is exceeded and the application is still running, the test step fails.

This option is useful if the application or script should only run for a specific short time, for instance 5 seconds, and then exit. If it keeps running after 5 seconds, it indicates a problem and your test case run might get stuck. Specify the timeout here to prevent that.

Log file path and name

Full path and name of a log file that Tosca Cloud should create for the application.

The log includes standard output (stdout) and standard error (stderr).

Expected exit code Exit status of the terminated process. If the exit code at runtime is different, the test step fails.

Timer actions

Timer actions let you measure runtime to evaluate test case performance.

You can set multiple timers, but they must all start and stop within the same test case. You can't measure time across multiple test cases.

Start

Starts a timer.

Value

Description

Timer name

Name of your timer.

If you set multiple timers, make sure that each name is unique.

Stop

Stops the specified timer. If this step is missing, any running timer simply runs until the test case is finished. It doesn't cause a failure.

Value

Description

Timer name

Name of the timer you want to stop (case-sensitive).

Maximum duration

The maximum expected time in milliseconds (ms). If the actual recorded time is longer than this value, the test step fails.

Wait

Holds the test run for the specified time (in milliseconds). This is useful if your application takes longer to load than the default 10 seconds.

Window actions

These actions are special tasks for the specified application window. The window must be open, otherwise the action fails with a not found error.

  • Bring to front brings the window to front and into focus.

  • Close closes the window.

  • Maximize enlarges the window to fill the current screen.

  • Minimize collapses the window to the taskbar.

  • Resize to default restores the window to its previous size and position (after minimizing or maximizing).

  • Verify if exists verifies whether the window is open.

  • Wait until closed waits until all windows with the specified title are closed.

  • Wait until open waits until at least one window with the specified title is open.

Value

Description

Window title

Title of the window to perform the desired action on.

The title is case-sensitive and must match exactly. You can also use wildcards.

Window index

If you have multiple windows or tabs with the same title, specify the index of the desired window with a numerical value, for example 1.

SAP standard modules

SAP standard modules are standard test steps specifically for SAP actions.

SAP login

Steers the SAP login screen.

Value

Description

Client

Client that you want to use.

User

User name of the user who signs in.

Password

Password of the user.

Language

Preferred language you want to use.

Enter

{Click} to perform a mouse click on the Enter button.

SAP logon

Opens an SAP session.

Value

Description

Path to SAP Logon*

Full path to the program file saplogon.exe.

SAP connection*

Name of the desired SAP connection or the SAP system ID.

Bypass SSO

True if the default sign-in method in your SAP environment is SSO (Single Sign-On) and you want to use your username and password instead.

SAP status bar

Verifies information on the SAP status bar and the current session.

Value

Description

Message

Message you want to verify.

Message type

Type of message you want to verify.

The following values are available:

  • Success

  • Warning

  • Error

  • Abort

  • Information

Session info

Information on the current session you want to verify.

The following values are available:

  • Client

  • Flushes

  • InterpretationTime

  • Language

  • Program

  • ResponseTime

  • RoundTrips

  • SystemName

  • Transaction

  • User

SAP sub toolbar

Steers SAP sub toolbar buttons.

Value

Description

Sub toolbar

Tooltip of the button you want to steer.

SAP Fiori message toast

Steers an SAP message toast and verifies the default name of the message toast and its text.

Value

Description

Page title

Caption of the page where you want to verify a message toast. Use this optional value to ensure that you steer the message toast on the correct page.

We recommend this option if you only want to open one page with a specific title in your browser. If you have more than one page with the same title open, close the other pages before you run SAP Fiori message toast.

Message toast

Default name of the message toast and the text it contains that you want to verify.

SAP menu

Steers SAP menus.

Value

Description

Menu bar

Path to the menu item.

Use -> to indicate nodes. Example: Insert -> Image.

Use x, X, or no value to select the menu item directly.

SAP toolbar

Steers an SAP toolbar that contains a field for the transaction code and buttons to steer the window.

Value

Description

Transaction code

Transaction code of the SAP toolbar you want to steer.

Enter

Confirms your selection or the data you have entered on the screen.

{Click} to perform a mouse click on the Enter button.

Save

Saves your work.

Back

Returns to the previous screen without saving your data.

Exit

Exits the current task without saving.

Cancel

Exits the current task without saving.

Print

Prints the data of the current screen.

Find

Searches for data on the current screen.

Find next

Performs an advanced search for data on the current screen.

First page

Scrolls to the first page.

Previous page

Scrolls to the previous page.

Next page

Scrolls to the next page.

Last page

Scrolls to the last page.

Help

Provides help for the field in which the cursor is located.

SAP tree view

Steers SAP tree views.

Value

Description

Menu path

Path to the menu item.

Use -> to indicate nodes. Example: Insert -> Image.

Use x, X, or no value to select the menu item directly.

Docked tree menu

Path to the menu item that you want to select in a docked tree view.

Depending on the technical ID of a tree view, use either Menu path or Docked tree menu.

SAP multiple logon license warning

Steers the modal dialog box License information for multiple logon that opens when you attempt to sign in to the system several times.

Value

Description

Logon and end any existing logons

Continues the current logon attempt and ends any existing logons.

Logon without ending any existing logons

Continues the current logon attempt without ending any existing logons.

Terminate this logon Terminates the current logon attempt.
Confirm selection Confirms your selection and closes the dialog box.
Cancel Cancels your selection and closes the dialog box.

SAP context menu

Use this module, to steer open SAP context menus.

Value

Description

Context menu

Path to the menu item.

Use -> to indicate nodes. Example: Insert -> Image.

Use x, X, or no value to select the menu item directly.

SAP Fiori wait for busy indicator

Pauses test execution to wait for a default or custom busy indicator. The test execution resumes after the busy indicator disappears. This ensures that all controls are fully loaded before the test execution continues.

Value

Description

Title

Title of the page where you want to pause and wait for a busy indicator.

We recommend that you open only one page with a specific title in your browser.

If you have more than one page with the same title open, close the other pages before you run the SAP WaitForBusyIndicator test step.

CSS classes

If the busy indicator on your SAP Fiori page uses custom CSS classes, enter the name of your CSS class. Example: .customBusyIndicator.

If your busy indicator uses multiple CSS classes, separate them with a comma. Example: .customBusyIndicatorCircle, .customBusyIndicatorLocal.

Note that if you don't specify a CSS class, the SAP Web Extension 3.0 searches for the default CSS classes for busy indicators in SAP Fiori: .sapUiLocalBusyIndicator and .sapUIBusy.

SAP Fiori tile

Clicks a specific tile on the SAP Fiori dashboard page.

Value

Description

Page title

Title of the page where you want to steer a tile.

Use this value to make sure that you steer the tile on the correct page.

We recommend that you only have one page with a specific title open in your browser. If you have more than one page with the same title open, close the other pages before you run the SAP Fiori tile module.

Tile category

Category to which the tile belongs.

Use this value to make sure that you steer the tile in the correct category.

Tile title Title of the tile you want to click.
Tile subtitle

Subtitle of the tile you want to click.

Use this value when multiple tiles with the same title exist in the category specified under Tile category.

Constraint index

Index of the tile. Enter a positive integer.

Use this value when multiple tiles with the same title and subtitle exist in the category specified under Tile category.

SAP NetWeaver Business Client logon

Steers the SAP NetWeaver Business Client (NWBC) system selection screen.

Value

Description

NWBC logon path

Full path to the SAP NetWeaver Business Client, including file name and extension.

NWBC connection

Name of the SAP NetWeaver Business Client.

SAP NetWeaver index page

Steers the index page of the SAP NetWeaver Business Client (NWBC) window.

Value

Description

Index menu

Path to the menu item.

Use -> to separate nodes. Example: Insert -> Image.

SAP emulated table tree

Steers SAP emulated table trees.

Value

Description

Header table

Steers the main table using the column and row values.

Scan algorithm

The algorithm that the system uses to navigate through the emulated table tree.

The following algorithms are available:

  • FastVerticalNoHorizontal: Only scroll vertically through the emulated tree. Don't use this algorithm if you want to steer an emulated tree that has a frozen top row.

  • FastVerticalFastHorizontalWithStaticArea: This is the default algorithm. It scrolls both vertically and horizontally through the emulated tree. Since it takes static areas into account, this algorithm works well for emulated table trees with a frozen top row.

  • DetailedIdentification: Scroll vertically and horizontally through the emulated tree. This algorithm identifies table cells more accurately, which means it's suitable for edge cases. You can also use it to steer emulated trees with static areas.