Show / Hide Table of Contents

Method elmFinder.Exists(+ 1 overload)


Overload

Finds the first matching descendant UI element in the window or UI element. Like elmFinder.Find, just different return type.

public bool Exists()
Returns
bool

If found, sets elmFinder.Result and returns true, else false.

Exceptions
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.


Overload(top)

Finds the first matching descendant UI element in the window or UI element. Can wait and throw NotFoundException. Like elmFinder.Find, just different return type.

public bool Exists(Seconds wait)
Parameters
wait  (Seconds)

The wait timeout, seconds. If 0, does not wait. If negative, does not throw exception when not found.

Returns
bool

If found, sets elmFinder.Result and returns true. Else throws exception or returns false (if wait negative).

Exceptions
NotFoundException
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.