public static UITestControl OpenApplication(IConfiguration configuration) { ApplicationUnderTest applicationUnderTest = ApplicationUnderTest.Launch(configuration["AppPath"]); applicationUnderTest.WaitForControlExist(); var application = UITestControlFactory.FromWindowHandle(applicationUnderTest.WindowHandle); application.SetFocus(); return(application); }