Events

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 event'

'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:

Mouse event attributes
Figure 41.55:  'Mouse event' attributes
'Client'

The name of the SUT client process to which the event is sent.

Variable: Yes

Restrictions: Must not be empty.

'QF-Test component ID'

The 'QF-Test ID' of the 'Window', 'Component' or 'Item' node that is the target of the event.

The "Select component" button [Select component] 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.

'Event'

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

X/Y

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

'Modifiers'

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.

ValueKey/Button
1Shift
2Control
4Meta or right mouse button (Longclick for Android and iOS)
8Alt or middle mouse button
16Left mouse button
Table 41.16:  Modifier values

Variable: Yes

Restrictions: Valid number

'Click count'

This value lets a Java program distinguish between a single and a double (or even multiple) click.

Variable: Yes

Restrictions: Valid number

'Popup trigger'

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

'Replay as "hard" event'

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

'QF-Test ID'

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 ('_').

'Delay before/after'

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

'Comment'

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 External editor 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 event'

'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 InputMethodEvent supports international character codes. QF-Test doesn't support InputMethodEvents directly. Instead, it converts events of type INPUT_METHOD_TEXT_CHANGED into 'Key events' of type KEY_TYPED.

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:

Key event attributes
Figure 41.56:  'Key event' attributes
'Client'

The name of the SUT client process to which the event is sent.

Variable: Yes

Restrictions: Must not be empty.

'QF-Test component ID'

The 'QF-Test ID' of the 'Window', 'Component' or 'Item' node that is the target of the event.

The "Select component" button [Select component] 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.

'Event'

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

'Key'

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

'Key code'

This is a Java specific code for the key, the keyCode member of the Java class KeyEvent.

Variable: Yes

Restrictions: Valid number

'Key char'

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

'Modifiers'

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.

ValueKey/Button
1Shift
2Control
4Meta or right mouse button (Longclick for Android and iOS)
8Alt or middle mouse button
16Left mouse button
Table 41.17:  Modifier values

Variable: Yes

Restrictions: Valid number

'QF-Test ID'

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 ('_').

'Delay before/after'

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

'Comment'

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 External editor 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

'Text input'

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 KEY_TYPED events, so input of text can be simulated by triggering one KEY_TYPED event per text character. If your SUT uses custom text components that actually require the KEY_PRESSED and KEY_RELEASED events, you cannot use this node type but have to resort to plain 'Key events'.

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:

Text input attributes
Figure 41.57:  'Text input' attributes
'Client'

The name of the SUT client process to which the event is sent.

Variable: Yes

Restrictions: Must not be empty.

'QF-Test component ID'

The 'QF-Test ID' of the 'Window', 'Component' or 'Item' node that is the target of the event.

The "Select component" button [Select component] 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.

'Text'

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.

'Clear target component first'

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

'Replay single events'

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

'QF-Test ID'

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 ('_').

'Delay before/after'

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

'Comment'

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 External editor 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

'Window event'

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 WINDOW_CLOSING event that is triggered when the user closes a window. It is also possible to simulate WINDOW_ICONIFIED and WINDOW_DEICONIFIED events.

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:

Window event attributes
Figure 41.58:  'Window event' attributes
'Client'

The name of the SUT client process to which the event is sent.

Variable: Yes

Restrictions: Must not be empty.

'QF-Test component ID'

The 'QF-Test ID' of the 'Window', 'Component' or 'Item' node that is the target of the event.

The "Select component" button [Select component] 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.

'Event'

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

'QF-Test ID'

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 ('_').

'Delay before/after'

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

'Comment'

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 External editor 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

'Component event'

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 ComponentEvent, it is better to stick to that name. Except for COMPONENT_MOVED and COMPONENT_SIZED events on a window, which are the result of the user moving or resizing the window interactively, all ComponentEvents are artificial and thus ignored. If you replay the event during a Web test not on a 'Web page' component, but on an HTML component, the browser window will be moved in a way that size and position of the inner rendering area match the given values.

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:

Component event attributes
Figure 41.59:  'Component event' attributes
'Client'

The name of the SUT client process to which the event is sent.

Variable: Yes

Restrictions: Must not be empty.

'QF-Test component ID'

The 'QF-Test ID' of the 'Window', 'Component' or 'Item' node that is the target of the event.

The "Select component" button [Select component] 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.

'Event'

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

'Y/Height'

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

'X/Width'

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

'QF-Test ID'

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 ('_').

'Delay before/after'

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

'Comment'

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 External editor 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

'Selection'

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:

Mouse event attributes
Figure 41.60:  'Selection' attributes
'Client'

The name of the SUT client process to which the event is sent.

Variable: Yes

Restrictions: Must not be empty.

'QF-Test component ID'

The 'QF-Test ID' of the 'Window', 'Component' or 'Item' node that is the target of the event.

The "Select component" button [Select component] 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.

'Detail'

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:

Class'Detail' attributeAction
CCombo sub-itemEmptyChoose item as current value
ColorDialogColor value in hexadecimal #rrggbb formatSelect given color
ColorDialogCANCELAbort color selection
Combo sub-itemEmptyChoose item as current value
CTabFolder sub-itemEmptySelect tab
CTabFolder sub-itemcloseClose tab
DirectoryDialogDirectory nameSelect given directory
DirectoryDialogCANCELAbort directory selection
FileDialogFile name, including directorySelect given file
FileDialogCANCELAbort file selection
FontDialogFont description, system specificSelect given font
FontDialogCANCELAbort file selection
MenucloseCancel the menu (close without selection)
MenuItemEmptySelect item
MessageBox Any of OKYESNOCANCELABORTRETRYIGNOREOPENSAVEClose with the given value as the user's choice
ProgressBarProgressBar valueSet the given value
ScaleScale valueSet the given value
SliderSlider valueSet the given value
SpinnerSpinner valueSet the given value
TabFolder sub-itemEmptySelect tab
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:

Node type'Detail' attributeAction
Confirmation dialog Any of OKYESNOCANCELRETRYClose the dialog with the given value as the user's choice
File dialog for download The file to save to or CANCELClose the dialog and save to the specified file or abort the download
Login dialog Username|Password or CANCEL Close the dialog and login with the specified data or abort. The password can by encrypted by right-clicking the 'Detail' field and selecting »Crypt password«. Please be sure to specify a password salt before encrypting via the option Salt for crypting passwords.
Prompt dialog The text to enter or CANCELClose the dialog and return the specified text or abort
Top-level <DOCUMENT>backNavigate back to the previous page
Top-level <DOCUMENT>forwardNavigate forward to the next page
Top-level <DOCUMENT>goto:URLNavigate to the specified URL
Top-level <DOCUMENT>refreshReload the current page
Top-level <DOCUMENT>stopStop loading the current page
<OPTION> or <SELECT> sub-item 0Choose the <OPTION> as current value
<OPTION> or <SELECT> sub-item 1Add the <OPTION> to the selection
<OPTION> or <SELECT> sub-item -1Remove the <OPTION> from the selection
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.

Node type'Detail' AttributeAction
Menuclickmenu:@/<Menu path> Where <Menu path> specifies the menu and the sub-menu item(s), seperated by /. For example, if you want to trigger the menu item Save as in the menu File you would enter clickmenu:@File/Save as for the attribute. You also need to enter the 'QF-Test ID' of the node Web page of the SUT in the attribute 'QF-Test component ID'.
Dialogselect:@/<Return value>Salt for crypting passwords Close a previously opened dialog. For details about possible return values please refer to: Native Dialogs You also need to enter the 'QF-Test ID' of the node Web page of the SUT in the attribute 'QF-Test component ID'.
Error dialogselect:1Closes the open dialog.
Message boxselect:2:trueSelect the button with id "2" and sets the checkbox value to true.
Save dialogselect:"C:\path\to\my.file"Closes the save dialog and returns the given path.
Open dialogselect:["C:\path\to\my.file"]Closes the open dialog and returns the given path.
Open dialogselect:["C:\path\to\my\first.file", "C:\path\to\my\second.file"]Closes the open dialog and returns the given paths.
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.

Node type'Detail' attributeAction
All (will be ignored)HOME Click on the Home-Button of the Emulator.
Android only, all (will be ignored)BACK Click on the Back-Button of the Emulator.
Android only, all (will be ignored)APP_SWITCH Click on the App-Switch-Button of the Emulator.
All (will be ignored)rotate: <angle> Rotate the whole display by the given angle. Valid values: 0, 90, 180, 270.
All (will be ignored)turn: <direction>turn rotates the whole display by 90 degrees in the given direction. Valid values: left, right.
Allswipe: <Direction> Swipe on a component into a certain direction. Available directions for a swipe (all without quotes)
  • from the left to the right border of the component: "right", "→", "go_left", "prevPage", "⭢",
  • from the right to the left border of the component: "left", "←", "go_right", "nextPage", "⭠",
  • from the bottom to the top border of the component: "up", "↑", "go_down", "scrollDown", "⭡",
  • from the top to the bottom border of the component: "down", "↓", "go_up", "scrollUp", "⭣",
  • from the top left to the bottom right corner of the component: "down_right", "↘", "go_up_left", "⭨",
  • from the bottom right to the top left corner of the component: "up_left", "↖", "go_down_right", "⭦",
  • from the top right to the bottom left corner of the component: "down_left", "↙", "go_up_right", "⭩",
  • from the bottom left to the top right corner of the component: "up_right", "↗", "go_down_left" and "⭧".
Allswipe: <Start coordinate X> <Start coordinate Y> <End coordinate X> <End coordinate X> [<time in ms> [<steps>]] Swipe on a component with start and end position of the swipe. Optionally, you can specify the time the swipe should take. When giving the time you can optionally also specify the number of steps for the execution of the swipe action. You only need to put the steps in very special cases.
The coordinates can be specified in number of pixels relative to the upper left corner of the component or as a position within the component, see table Positions for gestures. Samples: swipe: W C E C will swipe in the middle of the component from left (west) to the right (east), and swipe: C N C S from top to bottom and swipe: 0 0 E S from top left to bottom right.
Allzoom: <Start coordinate X> <Start coordinate Y> <distance> <angle> zoom is a two finger action. The start position of the two fingers is definted by the start coordinates, the movement via the distance and (in pixels) and the angle, a value from 0 to 359. Angle 0 for a horizontal, 90 for a vertical movement. The fingers each move the given distance with the given angle in opposite directions.
The coordinates can be specified in number of pixels relative to the upper left corner of the component or as a position within the component, see table Positions for gestures.
Samples: zoom: C C 50 0 zoom, starting from the middle the "fingers" move horizontally 50 pixels each.
Allpinch: <Finger 1 X> <Finger 1 Y> <Finger 2 X> <Finger 2 X>pinch is a two finger action. The coordinats specify the positions of the two fingers. From there they move towards each other until they meet.
The coordinates can be specified in number of pixels relative to the upper left corner of the component or as a position within the component, see table Positions for gestures.
Samples: pinch: 20 C 50 C horizontally in the middle of the component, the "fingers" start from pixel positions 20 and 50 and move towards each other until they meet.
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:

PositionExplanation
N Top border of the component (north).
E Right border of the component (east).
S Bottom border of the component (south).
W Left border of the component (west).
C Middle of the component (center) for the respective dimension.
Table 41.22:  Positions for gestures

Variable: Yes

Restrictions: None

'QF-Test ID'

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 ('_').

'Delay before/after'

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

'Comment'

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 External editor 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

'File selection'

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 java.awt.FileDialog, QF-Test has no chance to record the events the user generates while selecting a file, since they are all handled by the underlying system and never passed on to Java. For the same reason, the selection cannot be simulated as a sequence of mouse and key events. This is not the case with Swing's javax.swing.JFileChooser which is implemented as a normal dialog.

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:

File selection attributes
Figure 41.61:  'File selection' attributes
'Client'

The name of the SUT client process to which the event is sent.

Variable: Yes

Restrictions: Must not be empty.

'File'

The name of the file (without the directory part) that is to be selected.

Variable: Yes

Restrictions: Must not be empty

'Directory'

The directory of the file that is to be selected.

Variable: Yes

Restrictions: Must not be empty

'GUI engine'

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

'QF-Test ID'

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 ('_').

'Delay before/after'

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

'Comment'

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 External editor 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