Forum Discussion

mike_2's avatar
mike_2
New Contributor
12 years ago

NameMapping Issues with <ul> and <li> elements

I posted this in the "New User" Forum last week but got no responses, so I'll try here:



I'm having trouble with the NameMapping in TestComplete (v9).  Some levels of the HTML I'm working with (ul and li) are not getting picked up and it's causing problems for me.  Here is an example:



<div id="aui-3-5-1-4_1740" class="yui3-tabview-content">

    <ul class="focus-resources-tabs" id="aui-3-5-1-4_44114">

        <li class="yui3-widget" id="defects">

            <a class="yui3-tab-label" id="aui-3-5-1-4_10726">Defects

            </a>

        </li>

        <li class="yui3-widget" id="features">

            <a class="yui3-tab-label" id="aui-3-5-1-4_10782">Features

            </a>

        </li>

    </ul>

</div>



This is a snippet of what I'm running across.  We have a tabview where one or many tabs can show up.  The user can select any tabs to appear in the interface so I need to grab the tab based on its ID.  Well when I run the NameMapper, I get only two levels:

1) <div id="aui-3-5-1-4_1740" class="yui3-tabview-content">

2)  <a class="yui3-tab-label" id="aui-3-5-1-4_10726">Defects



...because the <li> level is not getting grabbed as its own entity.  Right now I'm having to pull the text out of the second level and check that...but this isn't a good solution (won't work for international versions, or for users who rename their tabs).



How can I map objects on the <ul> or <li> levels?



How can I manually map objects using their ids?  ("defects" or "features" in this case)



Thanks,



Michael Robinson