42.8 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.
42.8.1 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:
- 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
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 26.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_CLICKEDandMOUSE_DRAGGEDare the standard event IDs of the Java classMouseEvent.The abstract 'Mouse click' event is a compound of the events
MOUSE_MOVED,MOUSE_PRESSED,MOUSE_RELEASEDandMOUSE_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_OVERandMOUSE_DROP_TOare used to simulate Drag&Drop in the SUT. See section 49.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.
Value Key/Button 1 Shift 2 Control 4 Meta or right mouse button (Longclick for Android and iOS) 8 Alt or middle mouse button 16 Left mouse button Table 42.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
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
42.8.2 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 |
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:
- 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
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 26.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_TYPEDandKEY_RELEASEDare the standard event IDs of the Java classKeyEvent.The 'Keystroke' pseudo event is a compound of the events
KEY_PRESSED,KEY_TYPEDandKEY_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, noKEY_TYPEDevent 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_TYPEDevents 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
keyCodemember of the Java classKeyEvent.Variable: Yes
Restrictions: Valid number
- Key char
-
This is the
keyCharmember of the Java classKeyEvent. 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.
Value Key/Button 1 Shift 2 Control 4 Meta or right mouse button (Longclick for Android and iOS) 8 Alt or middle mouse button 16 Left mouse button Table 42.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
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
42.8.3 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 |
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:
- 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
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 26.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 »Encrypt text« 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
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
42.8.4 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 |
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:
- 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
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 26.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_ICONIFIEDandWINDOW_DEICONIFIED, the standard event IDs of the Java classWindowEvent.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
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
42.8.5 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 |
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:
- 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
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 26.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_SIZEDandCOMPONENT_MOVED, the standard event IDs of the Java classComponentEvent.Variable: No
Restrictions: None
- Y/Height
-
For a
COMPONENT_MOVEDevent set this to the new Y-coordinate of the window, for aCOMPONENT_SIZEDevent to its new height.Variable: Yes
Restrictions: Valid number, height > 0
- X/Width
-
For a
COMPONENT_MOVEDevent set this to the new X-coordinate of the window, for aCOMPONENT_SIZEDevent 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
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
42.8.6 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:
- 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
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 26.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 attribute Action CCombosub-itemEmpty Choose item as current value ColorDialogColor value in hexadecimal #rrggbb format Select given color ColorDialogCANCELAbort color selection Combosub-itemEmpty Choose item as current value CTabFoldersub-itemEmpty Select tab CTabFoldersub-itemcloseClose tab DirectoryDialogDirectory name Select given directory DirectoryDialogCANCELAbort directory selection FileDialogFile name, including directory Select given file FileDialogCANCELAbort file selection FontDialogFont description, system specific Select given font FontDialogCANCELAbort file selection MenucloseCancel the menu (close without selection) MenuItemEmpty Select item MessageBoxAny of OKYESNOCANCELABORTRETRYIGNOREOPENSAVEClose with the given value as the user's choice ProgressBarProgressBarvalueSet the given value ScaleScalevalueSet the given value SliderSlidervalueSet the given value SpinnerSpinnervalueSet the given value TabFoldersub-itemEmpty Select tab Table 42.18: Supported SWT widgets for a Selection event Note Eclipse/RCP makes heavy use of dynamic
CTabFolderswhere 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 theCTabFolderit currently resides in. This can be done by using the Proceduresqfs.qft#qfs.swt.ctabfolder.selectTabandqfs.qft#qfs.swt.ctabfolder.closeTab, provided in theqfs.qftstandard library. Besides the ubiquitousclientparameter, the only other parametertabnamemust 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 attribute Action 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 CANCELClose the dialog and login with the specified data or abort. The password can by encrypted by right-clicking the Detail field and selecting »Encrypt text«. 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 42.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 21), additionally to the ones listed for Web as above.
Node type Detail Attribute Action Menu clickmenu:@/<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 itemSave asin the menuFileyou would enterclickmenu:@File/Save asfor the attribute. You also need to enter the QF-Test ID of the nodeWeb pageof the SUT in the attribute QF-Test component ID.Dialog select:@/<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 pageof the SUT in the attribute QF-Test component ID.Error dialog select:1 Closes the open dialog. Message box select:2:true Select the button with id "2" and sets the checkbox value to true. Save dialog select:"C:\path\to\my.file" Closes the save dialog and returns the given path. Open dialog select:["C:\path\to\my.file"] Closes the open dialog and returns the given path. Open dialog select:["C:\path\to\my\first.file", "C:\path\to\my\second.file"] Closes the open dialog and returns the given paths. Table 42.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 packagesqfs.android.device, respectivelyqfs.ios.device, in the The standard libraryqfs.qft.Node type Detail attribute Action All (will be ignored) HOMEClick on the Home-Button of the Emulator. Android only, all (will be ignored) BACKClick on the Back-Button of the Emulator. Android only, all (will be ignored) APP_SWITCHClick 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>turnrotates the whole display by 90 degrees in the given direction. Valid values:left, right.All swipe: <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 "⭧".
All swipe: <Start coordinate X> <Start coordinate Y> <End coordinate X> <End coordinate Y>[<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 Cwill swipe in the middle of the component from left (west) to the right (east), andswipe: C N C Sfrom top to bottom andswipe: 0 0 E Sfrom top left to bottom right.All zoom: <Start coordinate X> <Start coordinate Y> <distance> <angle>zoomis 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 0zoom, starting from the middle the "fingers" move horizontally 50 pixels each.All pinch: <Finger 1 X> <Finger 1 Y> <Finger 2 X> <Finger 2 Y>pinchis 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 Chorizontally in the middle of the component, the "fingers" start from pixel positions 20 and 50 and move towards each other until they meet.Table 42.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:
Position Explanation NTop border of the component (north). ERight border of the component (east). SBottom border of the component (south). WLeft border of the component (west). CMiddle of the component (center) for the respective dimension. Table 42.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
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
42.8.7 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 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:
- 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 45.
Variable: Yes
Restrictions: See chapter 45
- 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
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