Cannot use SetControlValue in Windows Application

Jan 7, 2016 at 3:49 PM
Hi, I created a new External Application project to do some automation but no matter what I try I can't get SetControlValue to work. It appears that the system cannot locate any of my controls on the form. I even tried to use the standalone test app that comes with USD but I still can't get it to work.

If I use the debugger the error displayed is:
Automation Adapter (app=T,action=__SetControlValue_): Posted implicit action exception: Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter.DataDrivenAdapterException: DataDrivenAdapterException (op=SetControlValue,controlName=Text Input): The named control configuration wasn't found. Please contact your system administrator._
If I try a web application this works fine, I'm not sure if there is something wrong with my configuration. The configuration I used is pretty simple, this is it:
<?xml version="1.0" encoding="utf-8"?>
<initstring>
  <global />
  <interopAssembly>
    <WorkingDirectory>
    </WorkingDirectory>
    <URL>C:\USD\UII\SampleCode\UII\Sample Applications\StandAloneTestApp\bin\Debug\Microsoft.Uii.Samples.StandAloneTestApp.exe</URL>
    <Arguments>
    </Arguments>
    <hostInside />
  </interopAssembly>
  <adapter>
    <URL>Microsoft.Uii.HostedApplicationToolkit.AutomationHosting</URL>
    <type>Microsoft.Uii.HostedApplicationToolkit.AutomationHosting.AutomationAdapter</type>
  </adapter>
  <DataDrivenAdapterBindingsCollection>
    <DataDrivenAdapterBindings prefix="DDA_Prefix_1">
      <Type>Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter.UIADataDrivenAdapter, Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter</Type>
      <Controls>
      </Controls>
    </DataDrivenAdapterBindings>
    <DataDrivenAdapterBindings prefix="MSAA">
      <Type>Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter.WinDataDrivenAdapter,Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter</Type>
      <Controls>
        <AccControl name="Text Input" type="editable text">
          <Path>
            <FindWindow>
              <Find>
                <Class>WindowsForms10.EDIT.app.0.2bf8098_r9_ad1</Class>
              </Find>
            </FindWindow>
          </Path>
        </AccControl>
      </Controls>
    </DataDrivenAdapterBindings>
  </DataDrivenAdapterBindingsCollection>
</initstring>