XP out of process app

Jun 25, 2009 at 8:34 AM


I tested the NUnit and MS Test versions of your samples and they both crash on XP while on Vista they work fine. The main window is created and shown on screen, however this is the error I got:

System.InvalidOperationException was unhandled by user code
  Message="No process is associated with this object."
       at System.Diagnostics.Process.EnsureState(State state)
       at System.Diagnostics.Process.EnsureState(State state)
       at System.Diagnostics.Process.EnsureState(State state)
       at System.Diagnostics.Process.get_MainWindowHandle()
       at Microsoft.Test.AutomatedApplication.<>c__DisplayClass5.<SetOutOfProcessWindowHandler>b__4(Object sender, AutomationEventArgs e) in c:\dd\Wpf_TstInfra\src\wpf\test\Infra\TestUtilities\WpfUtilities\AutomatedApplication.cs:line 372
       at MS.Internal.Automation.InvokeHandlers.InvokeClientHandler(Delegate clientCallback, AutomationElement srcEl, AutomationEventArgs args)

The error seems to be triggered by this line here :


and yes I tried changing the time from 10 to 100. That seems to solve some issues on Vista but did not help on XP.


Best Regards

Jun 26, 2009 at 6:19 PM

Hi Cristids, Thanks for reporting this -- we will investigate!


Aug 26, 2009 at 4:18 PM

I am seeing the same thing on XP, and was wondering if the investigation turned up anything?


Jan 27, 2010 at 3:41 PM

I've got similar issue under XP. Please see more details here: http://testapi.codeplex.com/WorkItem/View.aspx?WorkItemId=13500&ProjectName=TestApi


P.S. Are there any plans to resolve the issue?


Jan 27, 2010 at 4:55 PM

"Question: what should be assigned to the "ApplicationImplementationFactory" Property?"

For an inprocess application, assign: ApplicationImplementationFactory = new WpfInProcessApplicationFactory().  For an outofproc application, assign: ApplicationImplementationFactory = new UIAutomationOutOfProcessApplicationFactory()

For the second issue, try to update sampleAppPath to exclude "file://".  See http://testapi.codeplex.com/WorkItem/View.aspx?WorkItemId=15264.



Jan 28, 2010 at 9:31 AM

My issue was resolved with "file:\" exclusion.