WaitForRecreatedControl

Wait until the control of the given class is re-created. i.e. has a new window handle.

void WaitForRecreatedControl(Control control, int maxWait);

void WaitForRecreatedControl(Control control);

Parameters

control: The control object to wait on.

maxWait: The maximum time in milliseconds to wait. If not given, the default wait time is used.

Return Value

None.

Remarks

When an application recreates a control as a result of an action, this method waits until this operation occurs. This methods polls for a control with the same text and class but with a different window handle. An exception is raised on timeout.

Example

appWindow = FindTopWindow("my Application");

Control searchReasults = appWindow.FindControl("search Items"); // find the control that contains the search results

appWindow.WaitForRecreatedControl(searchResults); // wait for the control to be recreated

 

This topic was last updated on June 21, 2019, at 02:49:50 PM.

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