White Framework Wait Commands

The White framework does not send an action until a window has entered the idle state after the previous action. In that case, White framework waits automatically if a window is busy. But how to wait for an element or a particular condition? How to avoid Thread.sleep during automation script development? In White, we can write our synchronization points. In this article, we will show you White framework waiting techniques and commands which are being used in all our desktop automation testing projects at Codoid.
Wait Based On HourGlass
Using WaitBasedOnHourGlass property (default value true), you can configure wait based on presence of hour glass.
WaitTill Method
WaitTill is one of the methods for Window object. You can use this method to wait until the certain condition matches.
In the above example, the script waits until the label field visibility=true. The default wait time is 5000 milliseconds. You can also change the Default wait time by setting BusyTimeout property as shown below.
WaitWhileBusy method
WaitWhileBusy method makes your script wait until the window is busy. Note: You no need to call this method for every action as it is called automatically at the end of every action.
Wait Hook
If you want to write your custom delay and the written custom code needs to be called after every action, then you can use IWaitHook interface as shown below.

One thought on “White Framework Wait Commands

Leave a Reply

Your email address will not be published. Required fields are marked *