Question: I'm opening a control using MSAA Server (Miscrosoft Active Accessibility) in order to automate tests over it using Coded UI. I'm using MSAA because the code is for VS2008 so UI Automation is unavailable.

It works good except for the case when there are two control elements on the same Window. The problem is the UI Map Hierarchy generated. Its wrong, but for the case when you are dealing with one control, works ok.

The problem using the example with MSAA example, found on sdk:

[MSAA Server Sample from Microsoft](http://imgur.com/802VEuc)

So, when I map the window, I get the right map, but when I map a element inside the list, the element is right, but isn't mapped inside the list:

[Coded UI Map from mapping the events and asserts](http://imgur.com/DJosWoa)

I have exactly the same problem in my app.

Thank you

Answer: 
I had a similar problem, so did some digging to see what the issue was.

The setup starts with the initial call, here's the snippet from the demo site
<http://www.jssor.com/development/index.html>

```
var jssor_slider1 = new $JssorSlider$("slider1_container", options);

```

which, among setting up all kinds of utility functions- more importantly does this 

```
    function JssorSlider(elmt, options) {
        var _SelfSlider = this;

        ... 
        // bunch of other functions
        ...

        $JssorDebug$.$Execute(function () {
            var outerContainerElmt = $Jssor$.$GetElement(elmt);

            if (!outerContainerElmt)
                $JssorDebug$.$Fail("Outer container '" + elmt + "' not found.");
        });
    }

```

so at this point, it's trying to collect the string you passed, which is the elmt variable- which is for what? Well let's take a look at that $GetElement function in jssor.js

```
    _This.$GetElement = function (elmt) {
    if (_This.$IsString(elmt)) {

        elmt = document.getElementById(elmt);
    }

    return elmt;
};

```

So, really, what it comes down to is this line for finding the element.

```
elmt = document.getElementById(elmt);

```

So the base of this error is 
"We tried to use your string to find a matching ID tag on the page and it didn't give us a valid value" 

This could be a typo, or another line of code modifying/removing the DOM.
Check if "Slider1\_Container" is present or Used.
In my case, I didn't have it in my html, but still I had added the js.
Removing js resolved my issue.