Excel UI controls

A control is a screen element in your application that you want to test. For example, a text box or a table. This topic lists all Excel UI controls that Tosca Cloud supports:

Worksheets

Tosca Cloud treats an entire worksheet as a single table. You can steer it just like any other table.

Note the following things:

  • The first read-only row with column letters, which is above the first row of the worksheet, is included in the table. It's the default header row.

  • The first read-only column with row numbers, which is to the left of column A in the worksheet, is included in the table. It's the default header column.

  • The cells in the worksheet table have additional properties you can use in your tests.

Properties of table cells

If you steer your Excel worksheet as a table, table cells have additional properties you can use in your tests.

Note that formatting syntax may be language-specific and depend on the language settings in Microsoft Excel. For example, for the property NumberFormat, you have to enter 0.0% for English versions and 0,0% for German versions.

This table lists all additional cell properties for Excel UI tests:

Cell property

What to do with it

BackgroundColor

Set or verify the background color, using the format R=<value>,G=<value>,B=<value>. For example, R=255,G=7,B=0.

Comment

Add, update, verify, or perform other actions on the comment.

Font

Set or verify the font. For example, Arial Black.

FontColor

Set or verify the text color, using the format R=<value>,G=<value>,B=<value>. For example, R=255,G=7,B=0.

FontSize

Set or verify the font size. Note that Excel rounds numbers to the nearest .5, so an input of 11.3 will be rounded to 11.5.

FontStyle

Set or verify the font styles bold and/or italic. For example, enter Bold Italic for bold and italic.

FormattedText

Verify or perform reading operations on the text content of a cell.

Formula

Set or verify a formula. For example, =SUM(A1:A2).

HasFormula

Verify whether the cell has a formula. For example, True for a cell with a formula.

IsHidden

Set or verify whether the cell is hidden. For example, True for a hidden cell.

IsLocked

Set or verify whether the cell is locked. For example, True for a locked cell.

Note

Add, update, verify, or perform other actions on the Excel Note.

NumberFormat

Set, verify, or perform other actions, using the formatting string for a particular cell. For more information, see the Microsoft documentation (opens in new tab).

Underline

Set or verify the font style underline. For example, enter Double for double underlined text.

Embedded controls

Microsoft Excel can have different control types in a worksheet:

  • Form controls to reference and interact with cell data without using VBA code.

  • ActiveX controls to design extensive, custom project requirements, with or without the use of VBA code.

This table lists all embedded controls that Tosca Cloud supports:

Name of embedded control

Control type

How to work with it in Tosca Cloud

Button

Form

Button

Check Box

Form

Checkbox

Combo Box

Form

Combobox

List Box

Form

Listbox

Option Button

Form

Radio button

Check Box

ActiveX

Checkbox

Combo Box

ActiveX

Combobox

Command Button

ActiveX

Button

Label

ActiveX

Label

List Box

ActiveX

Listbox

Option Button

ActiveX

Radio button

Text Box

ActiveX

Textbox

Toggle Button

ActiveX

Button

The state of the Toggle Button is defined by the additional property Selected. You can use the following values:

  • True, if the Toggle Button is selected (on).

  • False, if the Toggle Button isn't selected (off).

Spin Button

ActiveX

Button

A Spin Button has two components: the up arrow and the down arrow. Tosca Cloud can scan each as an individual button.

Use the additional property SpinNumericButtonName to identify each of these components.

Menu items

To steer menu items, use action mode Input for all parent menu items. Unlike grids, you can't steer Excel UI menu items by selecting them.