WaitWhileTopWindowCount

Waits until the number of top level windows matching the given criteria changes from the specified count.

void WaitWhileTopWindowCount(string wantedText, int count);

void WaitWhileTopWindowCount(string wantedText, int count, int maxWait);

void WaitWhileTopWindowCount(string wantedText, TextMatch textMatch, int count);

void WaitWhileTopWindowCount(string wantedText, TextMatch textMatch, int count, int maxWait);

void WaitWhileTopWindowCount(string wantedText, string wantedClass, int count);

void WaitWhileTopWindowCount(string wantedText, string wantedClass, int count, int maxWait);

void WaitWhileTopWindowCount(string wantedText, string wantedClass, TextMatch textMatch, int count);

void WaitWhileTopWindowCount(string wantedText, string wantedClass, TextMatch textMatch, int count, int maxWait);

void WaitWhileTopWindowCount(Predicate<Control> selectionFunction, int count);

void WaitWhileTopWindowCount(Predicate<Control> selectionFunction, int count, int maxWait);

Parameters

count: The number of windows to match.

maxWait: The maximum time in milliseconds to wait for the windows to reach the count specified. The default value is 120,000 milliseconds (2 minutes).

wantedText: The text caption of the Controls. The default match criteria is contains, case insensitive. This value can be none or an empty string "" if you are only matching on wantedClass.

wantedText: Options are TextMatch.Contains (default), TextMatch.Exact, TextMatch.StartsWith, TextMatch.EndsWith, TextMatch.MatchCase See TextMatch.

wantedClass: The window class name to wait for.

selectionFunction: A reference to a user supplied selection function. See SelectionFunction.

Return Value

None

Remarks

Where there can be multiple windows with the same text and class, and the number changes as a result of an action, this call waits until the number of matching top-level windows changes.

Example

WaitWhileTopWindowCount("Untitled - Notepad", 2); // waits until the number of windows matching the criteria changes from 2

Related:

 

This topic was last updated on January 13, 2022, at 02:42:23 PM.

Eggplant icon Eggplantsoftware.com | Documentation Home | User Forums | Support | Copyright © 2022 Eggplant