Reputation: 20675
If for a given UITestControl
, the WaitForControlExist()
and WaitForControlEnabled()
methods return true, is it guaranteed that the method WaitForControlReady()
will also return true?
In other word, are
uiItem.WaitForControlExist() && uiItem.WaitForControlEnabled()
and
uiItem.WaitForControlReady()
equivalent?
If not, what is the difference between them and what is the correct way to use them?
Upvotes: 3
Views: 4225
Reputation: 1507
WaitForControlReady() waits for the control to be ready to accept any mouse/keyboard inputs. Coded UI playback engine implicitly calls this API for all actions to wait for the control to be ready before doing any operation.
WaitForControlEnabled() – This waits for the control to be enabled.
WaitForControlExist() – This waits for the control to exist on the UI.
Even WaitForControlExist() and WaitForControlEnabled() methods return true WaitForControlReady() may be false because any asynchronize operations may block the control to be ready to receive any inputs.
Upvotes: 4