Java SWT 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
Standard controls
Tosca Cloud supports the following standard controls for
Java SWT-specific controls
In addition to the standard controls listed in this topic, Tosca Cloud also supports the following controls:
Editable ComboBox
Editable ComboBoxes are comboboxes that allow you to add new entries.
If you want to steer editable ComboBoxes, ensure that the BusinessType of the control is defined as EditableComboBox.
ExpandBar
Tosca Cloud identifies ExpandBars as tabcontrols. When you steer a hidden control in a scrollable ExpandBar, Tosca Cloud automatically scrolls to the control.
ListView
Tosca Cloud identifies ListViews as listboxes.
TabControl
Tosca Cloud identifies TabControls as TabFolders and CTabFolders. You can steer both like tabcontrols.
Note that user simulations only work on tabs that are visible on the screen.
You can close CTabFolders by using the parameter UserSimulation on the respective Tab Item. Enter the value {CLOSE} and action mode Input.
Pop-up or context menus
To steer pop-up or context menus, use the standard module Any SWT Window. You can find the module in the left pane of the test case building area, under Modules.
To steer pop-up menus with the module, you need to open a single Java SWT window that has a context menu.
ProgressBar
ProgressBars in Java SWT work the same way as ProgressBars in Java FX.
PushButton
Tosca Cloud identifies PushButtons as buttons.
Scale
Tosca Cloud identifies Scales as sliders.
Spinner
You can steer Spinners like you would a textbox.
Spinners have a numeric minimum and maximum value that starts at 0. You can add the minimum and maximum values to the properties of the Spinner while scanning. To do so, go to the Representation properties and select the properties Min and Max. Tosca Cloud displays these properties as TechnicalID parameters of the module.
If you try to steer a Spinner with a value that lies outside of the minimum and maximum range, Tosca Cloud resets the value to one that lies within the valid range.
You can also steer read-only Spinners, but only if the following apply:
-
The steering parameter UserSimulation is set to false.
-
You use action mode Input.
-
You use SendKeys or Keypress commands to select the buttons of the control.
StyledTextEditBox
StyledTextEditBoxes can be single-line, multiline, or read-only. You can steer all like you would a textbox.
For read-only StyledTextEditBoxes, only these action modes are available:
Action Mode |
Possible values |
Description |
---|---|---|
<value> |
Verifies the expected content of the StyledTextEditBox. |
|
{CLICK} |
Performs a left-click on the StyledTextEditBox. |
ToolBar
Tosca Cloud identifies ToolBars as menus.
You can scan all supported standard controls inside a toolbar as individual controls.
TreeView
Tosca Cloud identifies TreeViews as tabletrees.
Java security message
When you start a Java application, Java Runtime Environment may open a security message. This depends on your security settings.
You can close this message as described in Java security message.
Hidden controls
You can scan and steer controls that are outside the visible area of your application under test, but only if they're part of a scroll bar (ScollPane). Tosca Cloud automatically focuses the area which holds the respective control.