Click to See Complete Forum and Search --> : AutomationElement


TBBW
September 6th, 2010, 04:17 PM
hello,

why is the following piece of code not working?


AutomationElement element = null;

AndCondition conds = new AndCondition(
new PropertyCondition (AutomationElement.ProcessIdProperty, myProcess.Id),
new PropertyCondition(AutomationElement.NameProperty, "Dialog Title 2"));

while (element == null)
element = AutomationElement.RootElement.FindFirst(TreeScope.Children, conds);



regards,

ger