System.Windows.Automation.TreeWalker.GetLastChild C# (CSharp) Method

GetLastChild() public method

public GetLastChild ( AutomationElement element ) : AutomationElement
element AutomationElement
return AutomationElement
        public AutomationElement GetLastChild(AutomationElement element)
        {
            return GetLastChild(element, CacheRequest.Current);
        }

Same methods

TreeWalker::GetLastChild ( AutomationElement element, CacheRequest request ) : AutomationElement

Usage Example

 public void TreeIterationTest()
 {
     TreeWalker walker = new TreeWalker(Automation.ControlViewCondition);
     AutomationElement startingElement = ExplorerTargetTests.explorerHost.Element;
     AutomationElement iter = startingElement;
     iter = walker.GetFirstChild(iter);
     iter = walker.GetNextSibling(iter);
     iter = walker.GetParent(iter);
     Assert.AreEqual(startingElement, iter);
     iter = walker.GetLastChild(iter);
     iter = walker.GetPreviousSibling(iter);
     iter = walker.GetParent(iter);
     Assert.AreEqual(startingElement, iter);
 }
All Usage Examples Of System.Windows.Automation.TreeWalker::GetLastChild