I'm using a loop in the Ranorex thread that looks like the following:
Code: Select all
int listsize = ParentElement.ChildCount;
Element ChildElement;
for (int i = 0; i < listsize; i++)
{
ChildElement = null;
do
{
ChildElement = ParentElement.GetChild(i);
Thread.Sleep(32);
}while (ChildElement == null);
ListTable.Rows.Add(ChildElement.Name,
ChildElement.Description);
}
When the main window loses focus, the Ranorex thread stops reading elements until it retains focus.
Can anyone shed some light onto why this is happening and/or provide a work around solution.