Mono.UIAutomation.TestFramework.Application.GetWindow C# (CSharp) Method

GetWindow() public method

public GetWindow ( string name ) : Window
name string
return Window
		public Window GetWindow (string name)
		{
			AndCondition cond = new AndCondition (
			                        new PropertyCondition (AutomationElementIdentifiers.ControlTypeProperty, 
			                                               ControlType.Window),
			                        new PropertyCondition (AutomationElementIdentifiers.NameProperty, name));

			var ae = AutomationElement.RootElement.FindFirst (TreeScope.Children, cond);
			return new Window (ae);
		}