321 {
322 if(list.Count > 1)
323 for (int i = 0; i < list.Count; i++)
324 {
325 Action ac = list[i];
326 if (i == list.Count - 1)
327 continue;
328 ac.Perform();
329 }
330 Action la = list.Last();
331 AutomationElement ae = AutomationHelpers.GetElementByProcess(la.ProcessName, la.Title, la.AutomationID, la.Name, la.ClassName, la.Index);
332 if (la.Value == Action.ValueType.Name)
333 return ae.Name;
334 else if (la.Value == Action.ValueType.SelectionPattern)
335 return AutomationHelpers.GetSelection(ae);
336 else if (la.Value == Action.ValueType.TextPattern)
337 return AutomationHelpers.GetText(ae);
338 else if (la.Value == Action.ValueType.ValuePattern)
339 return AutomationHelpers.GetValue(ae);
340 else if (la.Value == Action.ValueType.TogglePattern)
341 return AutomationHelpers.GetToggle(ae);
342 else
343 return AutomationHelpers.GetImage(ae);
344 }