Findcontrol giving error "DataDrivenAdapterException Named control configuration not found."

Aug 12, 2014 at 2:09 PM
Edited Aug 12, 2014 at 2:14 PM
Hello All,

I have integrated one web application(bing.com) in hosted control. I have intialize my browser with following code.
_webBrowser = new WebBrowserExtended(false, true, true);
_webBrowser.Dock = DockStyle.Fill;
_webBrowser.Visible = true;
Controls.Add(_webBrowser);
This web application integrated successfully.

Now I want to automate my application using WebdataDrivenAdapter. Below is how I have define my Data driven Adapter
System.Xml.XmlDocument xml = new System.Xml.XmlDocument();
 xml.LoadXml(@" <DataDrivenAdapterBindingsCollection>
    <DataDrivenAdapterBindings>
      <Type>Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter.WebDataDrivenAdapter, Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter</Type>
      <Controls>
        <InputElement name=""bingSearchBox"" type=""InputElement"">
         <ElementMatchPath>/HTML/BODY/TABLE/TBODY/TR/TD/DIV/DIV[1]/DIV[1]/FORM/DIV/INPUT</ElementMatchPath>
        </InputElement>
        <InputElement name=""Submit Query"" type=""InputElement"">
          <ElementMatchPath>/HTML/BODY/TABLE/TBODY/TR/TD/DIV/DIV[1]/DIV[1]/FORM/DIV/INPUT[1]</ElementMatchPath>
        </InputElement>
      </Controls>
    </DataDrivenAdapterBindings></DataDrivenAdapterBindingsCollection>");
                    
Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter.WebDataDrivenAdapter dda = new WebDataDrivenAdapter(xml, _webBrowser);
bool temp = dda.FindControl("bingSearchBox");
Findcontrol giving me error that "DataDrivenAdapterException (op=FindControl,controlName=bingSearchBox): DDA0101: Named control configuration not found."


Can anyone help me?


Thanks in advance.