Timeouts, search areas and failures
The settings every check shares, and what happens when one fails.
Timeout: how long a check waits
A check does not look once and give up.It keeps looking until what it expects is on screen, then the test goes on at once.The timeout is the longest it will wait.Every check waits up to 5 seconds by default.
| Check | Passes | Fails |
|---|---|---|
| Visual Assert, Text Assert | As soon as the element or text is found and right | When the timeout ends without it |
| Visual Absent, Text Absent | As soon as the element or text has gone | When it is still there at the timeout |
| Count checks | As soon as the count follows its rule | When the count is still wrong at the timeout |
Your report page usually loads in 2 seconds, but up to 12 on a busy day.Set the check after it to 15 seconds.Most days it still passes after 2: a longer timeout costs nothing when the screen is quick.
Search area
Every visual and text check looks inside its search area, the dashed rectangle in its editor.
In the Visual Target Editor, the search area follows the visual target when you move it.Click its padlock to keep it where you put it: it then grows only if the visual target would end up outside it.
| Search area | Good for |
|---|---|
| Small, around the element | Fast, and never confused with a look-alike elsewhere.The best choice when the element stays in place. |
| Larger | An element that moves a little: a dialog that opens at different places, a list that grows. |
| Search Entire Screen | An element that can be anywhere, or a window that is never in the same place. |
When a Visual Assert or a Text Assert has not found its element in its search area after a second, it looks over the whole screen too, while it keeps waiting.A window that moved therefore does not fail the test.
When that happens, the report says the element was found outside its search area and offers Widen the Search Scope in GUI Test Studio..., which opens the check's editor on the right block.Widen it there and the next run finds the element at once.
If it fails: stop or continue
Each check says what its failure does, on the Preview & Execution tab of its Properties: Stop the test or Continue the test.
If it fails: Stop the test
If it fails: Continue the test
| By default | Why |
|---|---|
| Stop the test | For a check the clicks after it depend on, like a Visual Assert before a click.Clicking without it would hit the wrong place. |
| Continue the test | For a check that only confirms what is on screen: a layout, a count, a text that is not clicked.One run then reports every problem it meets. |
Events and Test Flow steps have the same setting.A click, a key or a step that fails stops the test by default; set it to Continue the test when the rest does not depend on it.See Events: what a test does.
Ignored checks
Tick Ignored to leave a check out of the runs without deleting it, for instance while a feature is being redesigned.It stays on the timeline, greyed out.
Where to change them
In GUI Test Studio, select the check: Timeout, the search area and If It Fails are in its Properties panel.Select several checks to change them all at once.
The defaults for new recordings are in GUI Test Runner-Recorder, Settings, Preferences, Recording Defaults.See also Settings worth knowing.
Still stuck?Tell us what you were trying to do, and we answer within one working day.Ask our team