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.

CheckPassesFails
Visual Assert, Text AssertAs soon as the element or text is found and rightWhen the timeout ends without it
Visual Absent, Text AbsentAs soon as the element or text has goneWhen it is still there at the timeout
Count checksAs soon as the count follows its ruleWhen the count is still wrong at the timeout
ExampleA slow page

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.

RecordingSearch areaSaveThe next runSaveMoved a little: still found
The search area is where the test looks for the element.If the element moves a little, it is still found, as long as it stays inside the area.Make the area larger for an element that moves around, or tick Search Entire Screen when it can be anywhere.
Search areaGood for
Small, around the elementFast, and never confused with a look-alike elsewhere.The best choice when the element stays in place.
LargerAn element that moves a little: a dialog that opens at different places, a list that grows.
Search Entire ScreenAn 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

Open menuCheck: menu showsCheck: Save buttonClick SaveCheck: Saved

If it fails: Continue the test

Open menuCheck: logo colourClick SaveCheck: Saved
Each check says what a failure does.Stop the test (the default for a check the clicks after it depend on) or continue to the next steps, so one run reports every problem it meets.
By defaultWhy
Stop the testFor 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 testFor 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