WaitForControlReady () vs WaitForControExist () / WaitForControEnabled ()

If, for a given UITestControl

method, WaitForControlExist()

and WaitForControlEnabled()

return true, is it guaranteed that the method WaitForControlReady()

will also return true?

In other words,

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?

+3


source to share


1 answer


WaitForControlReady () waits for the control to be ready to accept any mouse / keyboard inputs. The coded UI rendering engine implicitly calls this API for all actions waiting for the control to be ready before performing any operation.

WaitForControlEnabled () - waits for the control to be enabled.



WaitForControlExist () - Waits for the control to exist in the user interface.

Even the WaitForControlExist () and WaitForControlEnabled () methods return true. WaitForControlReady () can be false because any asynchronization operations can block control to be ready for any inputs.

+4


source







All Articles