Show / Hide Table of Contents

Constructor elmFinder.elmFinder


Overload

Stores the specified UI element properties in this object.

public elmFinder(string role = null, string name = null, Strings prop = default, EFFlags flags = 0, Func<elm, bool> also = null, int skip = 0, string navig = null)
Parameters
role  (string)

UI element role (elm.Role), like "LINK". Can have prefix "web:", "firefox:" or "chrome:" which means "search only in web page" and enables Chrome UI elements. Case-sensitive. Not wildcard. null means "can be any". Cannot be "". More info in Remarks.

name  (string)

UI element name (elm.Name). String format: wildcard expression. null means "any". "" means "empty or unavailable".

prop  (Strings)

Other UI element properties and search settings. Examples: "value=xxx|@href=yyy", new("value=xxx", "@href=yyy"). More info in Remarks.

flags  (EFFlags)
also  (Func<elm, bool>)

Callback function. Called for each matching UI element. Let it return true if this is the wanted UI element. Example: the UI element must contain point x y: o => o.GetRect(out var r, o.WndTopLevel) && r.Contains(266, 33)

skip  (int)

0-based index of matching UI element to use. Will skip this number of matching elements. Value -1 means "any", and can be useful when this finder is intermediate (ie not the last) in a path or when it has navig. If intermediate, will search for next element in all matching intermediate elements. If has navig, will retry with other matching elements if fails to navigate in the first found. It is slower and not so often useful, therefore the default value of this parameter is 0, not -1. Cannot be used with elmFinder.FindAll, unless it is not in the last part of path.

navig  (string)

If not null, after finding the specified UI element will call elm.Navigate with this string and use its result instead of the found element.