Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Conditions

jpeterka edited this page Aug 1, 2013 · 4 revisions

Conditions in RedDeer are defining some state that is checked by wait routines. Conditions can cover various situations like state of widget, status of server, availability of some control etc. Many conditions are used internally because RedDeer proclaims implicit safety-routines for widget lookup. So it means when you want to look for some Shell, RedDeer is processing some wait conditions to assure not to miss situation when the Shell can occur with some delay.

Anyway there might be another situation when user needs to create use predefined condition or create own condition to assure reliable test processing.

To perform wait condition that there are two main classes that can control conditions

WaitUntil(WaitCondition condition);
WaitWhile(WaitCondition condition);

These classes can utilize any WaitCondition comply instance to perform desired condition evaluation in time. For example if you want to wait until Shell with text "Delete Server" is available you can achieve this by this expression

new WaitUntil(new ShellWithTextIsActive("Delete Server")

You can use several predefined condition like:

  • ButtonWithTextIsActive
  • JobisRunning
  • ShelsIsActive
  • etc.

or you can create your own implementation

Clone this wiki locally