Show / Hide Table of Contents

Method elmFinder.Wait


Overload

Waits for a matching descendant UI element to appear in the window or UI element.

public elm Wait(Seconds timeout)
Parameters
timeout  (Seconds)

Timeout, seconds. Can be 0 (infinite), >0 (exception) or <0 (no exception). More info: Wait timeout.

Returns
elm

If found, returns elmFinder.Result. On timeout returns null if timeout is negative; else exception.

Exceptions
TimeoutException
ArgumentException
  • role is "" or invalid.
  • name is invalid wildcard expression ("**options " or regular expression).
  • prop contains unknown property names or errors in wildcard expressions.
  • navig string is invalid.
  • flags has UIA or ClientArea when searching in web page (role prefix "web:" etc) or elm.
  • role has a prefix ("web:" etc) when searching in elm.
  • elm.Item not 0 when searching in elm.
AuWndException

Invalid window handle (0 or closed). See also elmFinder.In.

AuException

Failed. For example, window of a higher UAC integrity level process.

Remarks

Same as elmFinder.Find, except:

  • 0 timeout means infinite.
  • on timeout throws TimeoutException, not NotFoundException.