UIAutomation.ExtensionMethodsElementCommon.PerformNavigateToLastChild C# (CSharp) Method

PerformNavigateToLastChild() public static method

public static PerformNavigateToLastChild ( this element ) : IUiElement
element this
return IUiElement
        public static IUiElement PerformNavigateToLastChild(this IUiElement element)
        {
            IUiElement result = null;

            classic.TreeWalker walker = new classic.TreeWalker(classic.Condition.TrueCondition);

            try {
                result = AutomationFactory.GetUiElement(walker.GetLastChild(element.GetSourceElement() as classic.AutomationElement));
            } catch {
            }

            return result;
        }