Version 8.0.1 |
This section lists all kinds of nodes that trigger actions in the SUT. Besides true Java events these include pseudo events with special behavior.
'Mouse events' simulate mouse movement and clicks as well as drag and drop operations. |
Contained in: All kinds of sequences.
Children: None
Execution:
The coordinates and other attributes of the event are sent to the
SUT together with the data about the target component. The
TestEventQueue
determines the corresponding component in the
SUT, adjusts the coordinates and triggers the resulting event.
Attributes:
Figure 41.55: 'Mouse event' attributes |
The name of the SUT client process to which the event is sent.
Variable: Yes
Restrictions: Must not be empty.
The 'QF-Test ID' of the 'Window', 'Component' or 'Item' node that is the target of the event.
The "Select component" button brings up a dialog in which you can select the component interactively. You can also get to this dialog by pressing [Shift-Return] or [Alt-Return], when the focus is in the text field. As an alternative you can copy the target node with [Ctrl-C] or »Edit«-»Copy« and insert its QF-Test component ID into the text field by pressing [Ctrl-V].
This attribute supports a special format for referencing components in other test suites (see section 25.1). Furthermore, sub-elements of nodes can be addressed directly without requiring separate nodes for them (see section 5.9). When using SmartIDs, you can address a GUI element directly via its recognition criteria. For more information, refer to SmartID and 'Component' nodes versus SmartID.
Variable: Yes
Restrictions: Must not be empty.
This ComboBox lets you choose the type of the event.
MOUSE_MOVED
, MOUSE_PRESSED
, MOUSE_RELEASED
,
MOUSE_CLICKED
and MOUSE_DRAGGED
are the standard event IDs of
the Java class MouseEvent
.
The abstract 'Mouse click' event is a compound of the events
MOUSE_MOVED
, MOUSE_PRESSED
, MOUSE_RELEASED
and MOUSE_CLICKED
.
During replay the pseudo event is simulated as four separate
events. This adds to the clarity of a test suite and simplifies
editing.
4.1.3+ The special 'Double click' event comprises all the individual events required to simulate a complete double click.
The events MOUSE_DRAG_FROM
, MOUSE_DRAG_OVER
and
MOUSE_DROP_TO
are used to simulate Drag&Drop in the SUT. See section 48.1 for details.
Variable: No
Restrictions: None
These are the coordinates of the MouseEvent. They are
relative to the upper left corner of the 'Window',
'Component' or 'Item' that is the target of
the event. They can be negative, e.g. to simulate a click on the
expansion toggle of a node in a JTree
.
Most of the time the exact coordinates for a mouse don't really matter, any place within the target will do. In this case you should leave the 'X' and 'Y' values empty to tell QF-Test to aim at the center of the target. Where possible QF-Test will leave the values empty when recording, provided the option Record MouseEvents without coordinates where possible is active.
Variable: Yes
Restrictions: Valid number or empty
This value reflects the state of the mouse buttons and the modifier keys [Shift], [Control], [Alt] and [Meta] during a mouse or key event. States are combined by adding up their values.
| |||||||||||||||
Table 41.16: Modifier values |
Variable: Yes
Restrictions: Valid number
This value lets a Java program distinguish between a single and a double (or even multiple) click.
Variable: Yes
Restrictions: Valid number
If this attribute is set, the event can trigger a PopupMenu. This is Java's somewhat peculiar way of supporting different conventions for triggering PopupMenus on different platforms.
Variable: Yes
Restrictions: None
If this attribute is set the event is replayed as a hard event, meaning it is triggered as a real system event that moves the mouse around and not just inserted as soft event into the event queue. Soft events are are typically better because they avoid impact of concurrent user mouse actions and are less likely to break due to interference from an overlapping window. Nevertheless there are certain special situations where hard events are helpful.
Variable: Yes
Restrictions: None
At the moment the 'QF-Test ID' attribute has no meaning for this type of node.
Variable: No
Restrictions: Must not contain any of the characters '\', '#', '$', '@', '&', or '%' or start with an underscore ('_').
These attributes cause a delay before or after the execution of the node. If a value is empty, the Default delay from the global options is used.
Variable: Yes
Restrictions: Valid number >= 0
Here you can enter a comment that explains the purpose of this node. This is the preferred way of documenting the test suite.
Note For detailed documentation, especially for 'Test set', 'Test case' or 'Procedure' nodes, this text area might not be the right place. There are many excellent editors that are much better suited to this task. The option External editor command lets you define an external editor in which comments can be edited conveniently by pressing [Alt-Return] or by clicking the button.
You can trigger special behaviors of some nodes using doctags, please see Doctags.
If you enter text in the comment field of a 'Component' node, the node will be considered as 'used' when you want to mark or delete unused components.
Variable: Yes
Restrictions: None
'Key events' simulate keyboard input in the SUT. These are used mainly for control and function keys. Input of text is better represented as a 'Text input'.
The special keyboard event |
Contained in: All kinds of sequences.
Children: None
Execution:
The key codes of the event are sent to the SUT together with the
data about the target component. The TestEventQueue
determines the
corresponding component in the SUT and triggers the resulting
event.
Attributes:
Figure 41.56: 'Key event' attributes |
The name of the SUT client process to which the event is sent.
Variable: Yes
Restrictions: Must not be empty.
The 'QF-Test ID' of the 'Window', 'Component' or 'Item' node that is the target of the event.
The "Select component" button brings up a dialog in which you can select the component interactively. You can also get to this dialog by pressing [Shift-Return] or [Alt-Return], when the focus is in the text field. As an alternative you can copy the target node with [Ctrl-C] or »Edit«-»Copy« and insert its QF-Test component ID into the text field by pressing [Ctrl-V].
This attribute supports a special format for referencing components in other test suites (see section 25.1). Furthermore, sub-elements of nodes can be addressed directly without requiring separate nodes for them (see section 5.9). When using SmartIDs, you can address a GUI element directly via its recognition criteria. For more information, refer to SmartID and 'Component' nodes versus SmartID.
Variable: Yes
Restrictions: Must not be empty.
This ComboBox lets you choose the type of the event.
KEY_PRESSED
, KEY_TYPED
and KEY_RELEASED
are the standard
event IDs of the Java class KeyEvent
.
The 'Keystroke' pseudo event is a compound of the events
KEY_PRESSED
, KEY_TYPED
and KEY_RELEASED
. During replay the
pseudo event is simulated as two or three separate events,
depending on whether it is a printable character key, or a
control or function key. In the latter case, no KEY_TYPED
event
is generated.
Variable: No
Restrictions: None
This is a convenience method to set 'Key code',
'Key char' and 'Modifiers'
directly by pressing the corresponding key while this component
has the keyboard focus. For KEY_TYPED
events
'Key char' is set to 0.
Unfortunately you can't select the [Tab] key this way since it is used for keyboard traversal. 'Key code' and 'Key char' for the [Tab] key are both 9.
Variable: No
Restrictions: None
This is a Java specific code for the key, the
keyCode
member of the Java class
KeyEvent
.
Variable: Yes
Restrictions: Valid number
This is the keyChar
member of the Java class
KeyEvent
. Its value is the character generated
created by the last key press, taking the state of the
[Shift] key into account. Control and
function keys always have a 'Key char' value of 65535.
Variable: Yes
Restrictions: Valid number
This value reflects the state of the mouse buttons and the modifier keys [Shift], [Control], [Alt] and [Meta] during a mouse or key event. States are combined by adding up their values.
| |||||||||||||||
Table 41.17: Modifier values |
Variable: Yes
Restrictions: Valid number
At the moment the 'QF-Test ID' attribute has no meaning for this type of node.
Variable: No
Restrictions: Must not contain any of the characters '\', '#', '$', '@', '&', or '%' or start with an underscore ('_').
These attributes cause a delay before or after the execution of the node. If a value is empty, the Default delay from the global options is used.
Variable: Yes
Restrictions: Valid number >= 0
Here you can enter a comment that explains the purpose of this node. This is the preferred way of documenting the test suite.
Note For detailed documentation, especially for 'Test set', 'Test case' or 'Procedure' nodes, this text area might not be the right place. There are many excellent editors that are much better suited to this task. The option External editor command lets you define an external editor in which comments can be edited conveniently by pressing [Alt-Return] or by clicking the button.
You can trigger special behaviors of some nodes using doctags, please see Doctags.
If you enter text in the comment field of a 'Component' node, the node will be considered as 'used' when you want to mark or delete unused components.
Variable: Yes
Restrictions: None
This is a pseudo event for simulating text input from the
keyboard. A single 'Text input' node replaces a whole sequence
of 'Key event' nodes. To achieve this, QF-Test takes
advantage of the fact that AWT and Swing text fields listen
only to |
Contained in: All kinds of sequences.
Children: None
Execution:
The text is sent to the SUT together with the data about the
target component. The TestEventQueue
determines the corresponding
component in the SUT and triggers the resulting events.
Attributes:
Figure 41.57: 'Text input' attributes |
The name of the SUT client process to which the event is sent.
Variable: Yes
Restrictions: Must not be empty.
The 'QF-Test ID' of the 'Window', 'Component' or 'Item' node that is the target of the event.
The "Select component" button brings up a dialog in which you can select the component interactively. You can also get to this dialog by pressing [Shift-Return] or [Alt-Return], when the focus is in the text field. As an alternative you can copy the target node with [Ctrl-C] or »Edit«-»Copy« and insert its QF-Test component ID into the text field by pressing [Ctrl-V].
This attribute supports a special format for referencing components in other test suites (see section 25.1). Furthermore, sub-elements of nodes can be addressed directly without requiring separate nodes for them (see section 5.9). When using SmartIDs, you can address a GUI element directly via its recognition criteria. For more information, refer to SmartID and 'Component' nodes versus SmartID.
Variable: Yes
Restrictions: Must not be empty.
The text that is to be sent to the SUT.
Note When inserting text into a password field it may be desirable to avoid having the password show up as plain text in the test suite or a run log. To that end the password can be encrypted by inserting the plain-text password, right-clicking and selecting »Crypt password« from the popup menu. Please be sure to specify a password salt before encrypting via the option Salt for crypting passwords.
Variable: Yes
Restrictions: No line breaks are possible.
If this attribute is set, and the target component is a text field or text area, the contents of the target component are removed before the new text is inserted.
Variable: Yes
Restrictions: None
If the target component is a text field or a text area, the text can optionally be inserted by manipulating the component directly through its API. This is much faster, but if KeyListeners are registered on the component they will not be notified of the change. If this attribute is set, key events are simulated for every single character.
Variable: Yes
Restrictions: None
At the moment the 'QF-Test ID' attribute has no meaning for this type of node.
Variable: No
Restrictions: Must not contain any of the characters '\', '#', '$', '@', '&', or '%' or start with an underscore ('_').
These attributes cause a delay before or after the execution of the node. If a value is empty, the Default delay from the global options is used.
Variable: Yes
Restrictions: Valid number >= 0
Here you can enter a comment that explains the purpose of this node. This is the preferred way of documenting the test suite.
Note For detailed documentation, especially for 'Test set', 'Test case' or 'Procedure' nodes, this text area might not be the right place. There are many excellent editors that are much better suited to this task. The option External editor command lets you define an external editor in which comments can be edited conveniently by pressing [Alt-Return] or by clicking the button.
You can trigger special behaviors of some nodes using doctags, please see Doctags.
If you enter text in the comment field of a 'Component' node, the node will be considered as 'used' when you want to mark or delete unused components.
Variable: Yes
Restrictions: None
WindowEvents are of limited use for a test suite since most of
them are not generated as a direct consequence of some user
interaction.
The only
exception is the |
Contained in: All kinds of sequences.
Children: None
Execution:
The event is sent to the SUT together with the data about the
target window. The TestEventQueue
determines the corresponding
window in the SUT and triggers the resulting event.
Attributes:
Figure 41.58: 'Window event' attributes |
The name of the SUT client process to which the event is sent.
Variable: Yes
Restrictions: Must not be empty.
The 'QF-Test ID' of the 'Window', 'Component' or 'Item' node that is the target of the event.
The "Select component" button brings up a dialog in which you can select the component interactively. You can also get to this dialog by pressing [Shift-Return] or [Alt-Return], when the focus is in the text field. As an alternative you can copy the target node with [Ctrl-C] or »Edit«-»Copy« and insert its QF-Test component ID into the text field by pressing [Ctrl-V].
This attribute supports a special format for referencing components in other test suites (see section 25.1). Furthermore, sub-elements of nodes can be addressed directly without requiring separate nodes for them (see section 5.9). When using SmartIDs, you can address a GUI element directly via its recognition criteria. For more information, refer to SmartID and 'Component' nodes versus SmartID.
Variable: Yes
Restrictions: Must not be empty.
This ComboBox lets you choose the type of the event.
Possible values are WINDOW_OPENED
, WINDOW_CLOSING
, WINDOW_CLOSED
,
WINDOW_ACTIVATED
, WINDOW_DEACTIVATED
, WINDOW_ICONIFIED
and
WINDOW_DEICONIFIED
, the standard event IDs of the Java class
WindowEvent
.
Variable: No
Restrictions: None
At the moment the 'QF-Test ID' attribute has no meaning for this type of node.
Variable: No
Restrictions: Must not contain any of the characters '\', '#', '$', '@', '&', or '%' or start with an underscore ('_').
These attributes cause a delay before or after the execution of the node. If a value is empty, the Default delay from the global options is used.
Variable: Yes
Restrictions: Valid number >= 0
Here you can enter a comment that explains the purpose of this node. This is the preferred way of documenting the test suite.
Note For detailed documentation, especially for 'Test set', 'Test case' or 'Procedure' nodes, this text area might not be the right place. There are many excellent editors that are much better suited to this task. The option External editor command lets you define an external editor in which comments can be edited conveniently by pressing [Alt-Return] or by clicking the button.
You can trigger special behaviors of some nodes using doctags, please see Doctags.
If you enter text in the comment field of a 'Component' node, the node will be considered as 'used' when you want to mark or delete unused components.
Variable: Yes
Restrictions: None
The name 'Component event' for this node may be misleading,
since QF-Test filters all of these events except for windows, but
since they represent the Java class |
Contained in: All kinds of sequences.
Children: None
Execution:
The event is sent to the SUT together with the data about the
target window. The TestEventQueue
determines the corresponding
window in the SUT and triggers the resulting event.
Attributes:
Figure 41.59: 'Component event' attributes |
The name of the SUT client process to which the event is sent.
Variable: Yes
Restrictions: Must not be empty.
The 'QF-Test ID' of the 'Window', 'Component' or 'Item' node that is the target of the event.
The "Select component" button brings up a dialog in which you can select the component interactively. You can also get to this dialog by pressing [Shift-Return] or [Alt-Return], when the focus is in the text field. As an alternative you can copy the target node with [Ctrl-C] or »Edit«-»Copy« and insert its QF-Test component ID into the text field by pressing [Ctrl-V].
This attribute supports a special format for referencing components in other test suites (see section 25.1). Furthermore, sub-elements of nodes can be addressed directly without requiring separate nodes for them (see section 5.9). When using SmartIDs, you can address a GUI element directly via its recognition criteria. For more information, refer to SmartID and 'Component' nodes versus SmartID.
Variable: Yes
Restrictions: Must not be empty.
This ComboBox lets you choose the type of the event.
Possible values are COMPONENT_SIZED
and COMPONENT_MOVED
, the standard event IDs of the Java class
ComponentEvent
.
Variable: No
Restrictions: None
For a COMPONENT_MOVED
event set this to the new Y-coordinate of the
window, for a COMPONENT_SIZED
event to its new height.
Variable: Yes
Restrictions: Valid number, height > 0
For a COMPONENT_MOVED
event set this to the new X-coordinate of the
window, for a COMPONENT_SIZED
event to its new width.
Variable: Yes
Restrictions: Valid number, width > 0
At the moment the 'QF-Test ID' attribute has no meaning for this type of node.
Variable: No
Restrictions: Must not contain any of the characters '\', '#', '$', '@', '&', or '%' or start with an underscore ('_').
These attributes cause a delay before or after the execution of the node. If a value is empty, the Default delay from the global options is used.
Variable: Yes
Restrictions: Valid number >= 0
Here you can enter a comment that explains the purpose of this node. This is the preferred way of documenting the test suite.
Note For detailed documentation, especially for 'Test set', 'Test case' or 'Procedure' nodes, this text area might not be the right place. There are many excellent editors that are much better suited to this task. The option External editor command lets you define an external editor in which comments can be edited conveniently by pressing [Alt-Return] or by clicking the button.
You can trigger special behaviors of some nodes using doctags, please see Doctags.
If you enter text in the comment field of a 'Component' node, the node will be considered as 'used' when you want to mark or delete unused components.
Variable: Yes
Restrictions: None
A 'Selection' node represents an abstract event like selecting a menu item, choosing an entry in a combo box or selecting something from or closing a system dialog. Currently this event node is used only for SWT, web and Electron SUT clients, where some events cannot be triggered by "soft" mouse events, . The alternative of using "hard" events has some disadvantages as described for the 'Replay as "hard" event' attribute of a 'Mouse event'. The 'Detail' attribute determines the kind of operation to perform, or the value to select, depending on the target component. |
Contained in: All kinds of sequences.
Children: None
Execution: The event is sent to the SUT together with the data about the target component. The component is resolved and an action performed which depends on the type of component as listed in the table above.
Attributes:
Figure 41.60: 'Selection' attributes |
The name of the SUT client process to which the event is sent.
Variable: Yes
Restrictions: Must not be empty.
The 'QF-Test ID' of the 'Window', 'Component' or 'Item' node that is the target of the event.
The "Select component" button brings up a dialog in which you can select the component interactively. You can also get to this dialog by pressing [Shift-Return] or [Alt-Return], when the focus is in the text field. As an alternative you can copy the target node with [Ctrl-C] or »Edit«-»Copy« and insert its QF-Test component ID into the text field by pressing [Ctrl-V].
This attribute supports a special format for referencing components in other test suites (see section 25.1). Furthermore, sub-elements of nodes can be addressed directly without requiring separate nodes for them (see section 5.9). When using SmartIDs, you can address a GUI element directly via its recognition criteria. For more information, refer to SmartID and 'Component' nodes versus SmartID.
Variable: Yes
Restrictions: Must not be empty.
The 'Detail' attribute specifies the kind of operation to perform or the value to select, depending on the target component. The possible combinations are listed in detail below.
SWT The following combinations of widgets and 'Detail' values are currently supported for SWT:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Table 41.18: Supported SWT widgets for a 'Selection' event |
Note Eclipse/RCP makes heavy use of dynamic CTabFolders
where the items can be moved between folders. The items represent the actual business
objects whereas the folders are just scaffolding to hold them. Besides, the layout of
the folders and items can change drastically when switching perspectives. Thus it is
often desirable to be able to select or close an item independent of the
CTabFolder
it currently resides in. This can be done by using the
'Procedures'qfs.qft#qfs.swt.ctabfolder.selectTab
and
qfs.qft#qfs.swt.ctabfolder.closeTab
, provided in the qfs.qft
standard library. Besides the ubiquitous client
parameter, the only other
parameter tabname
must be set to the name of the item to select or close.
Web The following combinations of DOM nodes and 'Detail' values are currently supported for web SUT clients:
| ||||||||||||||||||||||||||||||||||||||||||
Table 41.19: Supported DOM nodes for a 'Selection' event |
ElectronThe following Combinations of DOM nodes and the 'Detail' attribute are currently support for Electron applications (see chapter 20), additionally to the ones listed for Web as above.
| |||||||||||||||||||||||||||
Table 41.20: Supported DOM nodes for Electron SUTs in a 'Selection' Event |
Android
iOS The following values of the
the 'Detail' attribute are currently support for Android applications
(see chapter 16) and iOS applications
(see chapter 17). If you prefer to execute the
'Selection' without having to bother about the syntax in the
'Detail' attribute have a look at
the procedures in the packages
qfs.android.device
, respectively qfs.ios.device
,
in the The standard libraryqfs.qft
.
| |||||||||||||||||||||||||||||||||
Table 41.21: Supported values for a 'Selection' node for Android and iOS |
Gestures have a start and an end point. Each point has an X and a Y coordinate. It can either be the distance relative to the upper left corner of the component in pixels or the position within the component. The following positions are available:
| |||||||||||||||
Table 41.22: Positions for gestures |
Variable: Yes
Restrictions: None
At the moment the 'QF-Test ID' attribute has no meaning for this type of node.
Variable: No
Restrictions: Must not contain any of the characters '\', '#', '$', '@', '&', or '%' or start with an underscore ('_').
These attributes cause a delay before or after the execution of the node. If a value is empty, the Default delay from the global options is used.
Variable: Yes
Restrictions: Valid number >= 0
Here you can enter a comment that explains the purpose of this node. This is the preferred way of documenting the test suite.
Note For detailed documentation, especially for 'Test set', 'Test case' or 'Procedure' nodes, this text area might not be the right place. There are many excellent editors that are much better suited to this task. The option External editor command lets you define an external editor in which comments can be edited conveniently by pressing [Alt-Return] or by clicking the button.
You can trigger special behaviors of some nodes using doctags, please see Doctags.
If you enter text in the comment field of a 'Component' node, the node will be considered as 'used' when you want to mark or delete unused components.
Variable: Yes
Restrictions: None
A 'File selection' is a pseudo event that you only need in a special case.
If your SUT uses the standard AWT file selection dialog,
implemented by the class Therefore QF-Test just records the result of the file selection in the form of this node and stores that data in the FileDialog upon replay before closing it. For the SUT there is no difference to an actual selection by the user. |
Contained in: All kinds of sequences.
Children: None
Execution:
File and directory are stored in an open java.awt.FileDialog
and the dialog
is closed.If no FileDialog is open, a ComponentNotFoundException
is
thrown.
Attributes:
Figure 41.61: 'File selection' attributes |
The name of the SUT client process to which the event is sent.
Variable: Yes
Restrictions: Must not be empty.
The name of the file (without the directory part) that is to be selected.
Variable: Yes
Restrictions: Must not be empty
The directory of the file that is to be selected.
Variable: Yes
Restrictions: Must not be empty
The GUI engine in which to look for a file selection dialog. Only relevant for SUTs with more than one GUI engine as described in chapter 44.
Variable: Yes
Restrictions: See chapter 44
At the moment the 'QF-Test ID' attribute has no meaning for this type of node.
Variable: No
Restrictions: Must not contain any of the characters '\', '#', '$', '@', '&', or '%' or start with an underscore ('_').
These attributes cause a delay before or after the execution of the node. If a value is empty, the Default delay from the global options is used.
Variable: Yes
Restrictions: Valid number >= 0
Here you can enter a comment that explains the purpose of this node. This is the preferred way of documenting the test suite.
Note For detailed documentation, especially for 'Test set', 'Test case' or 'Procedure' nodes, this text area might not be the right place. There are many excellent editors that are much better suited to this task. The option External editor command lets you define an external editor in which comments can be edited conveniently by pressing [Alt-Return] or by clicking the button.
You can trigger special behaviors of some nodes using doctags, please see Doctags.
If you enter text in the comment field of a 'Component' node, the node will be considered as 'used' when you want to mark or delete unused components.
Variable: Yes
Restrictions: None
Last update: 9/10/2024 Copyright © 1999-2024 Quality First Software GmbH |