// Get the child element by its Name/AutomationId
//
public IElement GetChild(string identifier)
{
Log.LogMessage("Looking for child '" + identifier+ "' of '" + this.ae.Current.Name + "'.");
var walker = new TreeWalker(this.GenerateOrCondition(identifier));
var currentElement = walker.GetFirstChild(this.ae);
// Throw exception if element was not found correctly.
//
if (currentElement == null)
{
throw new ChildNotFoundException("Child '" + identifier + "' not found for parent '" +
this.ae.Current.Name + "'.");
}
return Factories.ElementFactory.GetIElementFromBase(currentElement);
}