Events: what a test does
Clicks, typing, scrolling, drag and drop and the Test Flow steps: add them, edit them in plain words, change several at once.
Events and checks
A test is made of two things.An event is something the test does: a click, a text typed, a scroll, an app started.A check is something the test verifies.A recording creates both for you, and this guide is about the events.
You find every event in the Events palette: its tab stands at the top of GUI Test Studio's left column, next to Assertions.
The Events palette
| Group | What it holds |
|---|---|
| Gestures | Whole actions, the way a person thinks of them: a click, a drag and drop, a text typed, a hotkey.This is what a recording creates, and what you will use most. |
| Basic Inputs | The single moves a gesture is made of: a mouse button going down or up, a key going down or up.For the rare case where no gesture fits. |
| Test Flow | Steps that drive the test rather than the app: wait, open a web app, hand a file to a page, take the network away and give it back, start or close an app, connect a phone, run a script. |
| Gamepad Events | The buttons and sticks of a game controller.The group shows once you turn game controllers on in the Preferences, or when a test holds such events. |
Add an event
Drag a tile onto the timeline, at the moment it should happen, or double-click it to place it at the playhead.A mouse event lands on a Mouse Events track and a keyboard event on a Keyboard Events track.When the test has no such track yet, one is created for you.
Mouse gestures
| Event | What it does | What you set |
|---|---|---|
| Single, Double, Triple and Multi Click | Clicks the element found by the check before it, once or several times. | The mouse button: left, right or middle. |
| Long Press | Presses the button and holds it. | The button, and how long it is held. |
| Drag & Drop | Picks one element up and drops it on another.It comes with two checks of its own: one finds the source, the other the destination. | The button, how long the drag takes, and the two visual targets. |
| Scroll Gesture | Turns the mouse wheel. | The direction, by how many notches, over how long, and where the pointer stands. |
| Mouse Path | Moves the pointer along a path: for a menu that opens on hover, a drawing, a game. | The button held while it moves. |
Step by step: a scroll
A scroll is described in words: which way, by how much, over how long, and where the pointer stands while the wheel turns.The place matters, because a page scrolls only when the pointer is over it.
- 1
Select the Scroll Gesture
Click its block on the timeline, or drag a Scroll Gesture from the Events palette first.The Properties panel shows a small preview of the frame with an arrow where the wheel turns.
- 2
Click Edit Scroll
Edit Scroll... opens the frame large.Click, or drag, to put the wheel on the list or the page that must scroll.Zoom with the mouse wheel when the target is small.
Edit Scroll: click the frame to put the wheel where it turns. - 3
Say which way and how far
Choose the direction: down, up, left or right.Set the number of notches, one notch being one click of the wheel, and over how long they are spread.The sentence under the fields reads the scroll back to you.
- 4
Click OK
The block on the timeline now does that scroll.One Undo brings the previous one back.
Step by step: a drag and drop
A Drag & Drop needs two things found on the screen: what is picked up, and where it is dropped.So it carries two visual targets, and the run finds each one wherever it stands that day.
- 1
Select the Drag & Drop
A recording creates one whenever you drag something.To build one by hand, drag Drag & Drop from the Events palette to the moment it should happen.
- 2
Show the source
Under Source (drag), click Edit Visual Target and draw a rectangle around the element to pick up: a file, a card, a slider's handle.
- 3
Show the destination
Under Destination (drop), click Edit Visual Target and draw a rectangle around the place to drop it on: a folder, a column, the basket.
- 4
Set the button and the duration
The duration is how long the drag takes.Give it more time when your app needs to see the element move before it accepts the drop.
Step by step: a mouse path
A Mouse Path moves the pointer along a line you draw, with or without a button held.Use it where the way matters, not only the destination: a menu that opens when the pointer passes over it, a signature, a slider dragged slowly, a game.
- 1
Select the Mouse Path
The Properties panel shows the path drawn over the frame.
- 2
Open the editor
Click Open Visual Editor... under the Path Preview.The Visual Path Editor shows the frame with the path on it.
- 3
Draw the path
Press the mouse button on the frame and draw.The path is recorded as you move, with its timing, and every point appears in the list beside the frame with its time and position.
- 4
Play it back, then apply
The play button shows the pointer following the path at its real speed.Clear starts over, Reset to Original Path brings back the path as it was, and Apply keeps the new one.
Back in the Properties panel, Button says which button is held along the way.
Keyboard gestures
| Event | What it does | What you set |
|---|---|---|
| Type Text | Types a text, key by key. | The text, and its duration: a shorter duration types faster. |
| Hotkey | Presses a combination of keys, such as Ctrl+S. | Click the field and press the combination itself. |
| Key Hold | Holds one key down for a while. | The key, and how long it is held. |
| Multi-Tap Key | Taps one key several times, such as Tab three times. | The key, the number of taps, and the pause between them. |
| Preset Shortcuts | Copy, Paste, Cut, Select All, Undo, Redo, Save and Duplicate, as ready-made hotkeys. | Nothing: drop it in. |
Test Flow
Test Flow steps do not act on your app's screen.They decide how the test itself goes: when it waits, and which app, web page, phone or script it starts.They belong to the whole test, so they sit on the time ruler, wherever you drop them.
| Step | What it does |
|---|---|
| Wait | Pauses the run for a fixed time. |
| Open Web App | Opens a web address in a clean browser window. |
| Upload File | Hands files to the web page, without the system's file window. |
| Run JavaScript | Runs JavaScript inside the web page the test opened. |
| Go Offline | Cuts the network of the app under test, a program or the whole computer. |
| Go Online | Gives the connection back. |
| Run App | Starts a program. |
| Quit App | Closes an app. |
| Connect Phone | Puts an Android phone's screen on this screen. |
| Run Python Script | Runs a short Python script. |
Each one has its settings and examples in Test Flow: waits, apps, phones and scripts.
Game controller
A test can press the buttons and move the sticks of a game controller.Recording and showing these events is off until you turn it on in the Preferences.See Web, phones, virtual machines and games.
Edit an event
Click a block on the timeline.The Properties panel shows, in its tabs, one row for each thing you can change, in plain words: the button of a click, the text of a Type Text, the direction of a scroll.Every change is one step of Undo.
| Row | What it means |
|---|---|
| Position | The moment the event happens.Dragging the block on the timeline changes it too. |
| Visualize in Preview | Draws the event on the preview while you edit: the click, the keys, the scroll.It changes nothing in the run. |
| Ignored | The block stays on the timeline, but the run skips it.Handy to try a test without a step. |
| If It Fails | Stop the test, the default, or Continue the test when this event does not do what it should, such as a click whose element is not there. |
| Advanced: Events Inside | The smaller events a gesture is made of, such as a button going down and up.They have a tab of their own, and you rarely need it. |
Change several events at once
Select two or more blocks of the same kind, with Ctrl+click or by dragging a rectangle around them.The Properties panel shows the same rows, and a change applies to every selected block in one step.A row reads Multiple Values where the blocks differ, and it stays untouched unless you edit it.
Your app drops letters when five fields are typed at recording speed.Select the five Type Text blocks and set their duration once: all five now type more slowly.
This works for checks too: select several checks of one kind to change their timeout, or what happens when they fail, in one go.
Still stuck?Tell us what you were trying to do, and we answer within one working day.Ask our team