TracerFilter

protected override void Run(IUITestActionStack stack)
{
    UITestAction action = stack.Peek();
    WriteLine("Action {");
    WriteLine("ActionName: " + action.ActionName);
    WriteLine("UI Name: " + action.UIElement.Name);
    WriteLine("UI ControlType: " + action.UIElement.ControlTypeName);
    WriteLine("UI TechnologyName: " + action.UIElement.TechnologyName);
    WriteLine("UI Value: " + action.UIElement.Value);
    WriteLine("UI ClassName: " + action.UIElement.ClassName);
    WriteLine("}");
}

private void WriteLine(string str)
{
    Trace.WriteLine(str + "&ltbr/&gt");
}

The TracerFilter is undeniably the simplest filter. Only really useful in debugging, it prints out most relevant info of any action that it processes. It's usually a good idea for this filter to be after the RemoveRedundancyFilter, as there are otherwise a lot of spurious actions recorded.

Last edited Aug 1, 2014 at 6:24 PM by wgoodin, version 3