Forum Discussion

RobLee's avatar
RobLee
New Contributor
7 years ago
Solved

How to keep DOM elements from showing in the Tree View

Hi,

 

  We are new to TC and i'm trying to help our QA team work with how TC identifies and maps HTML elements on a page.

  

  Are their any attributes we can add to HTML elements that will tell TC how to ignore the elements?

 

  For example, look at this HTML

   

    <div>

       <div>

        <span>Enter your name</span>

        <input id="Name">

        </div>

    </div>

 

  What if I didn't want TC to include the divs or span in the Tree view it generates after recording the test?  

 

   Is this possible?  

 

  Thanks,

 

 

 

 

  • Under Tools | Options | Engines | NameMapping, there's an option about Extended Find.  If that's checked, "extra" DIV tags and spans will be "collapsed" if they aren't necessary.  This is useful to an extent.

     

    Personally, I prefer to do this manually.  You can manually check the "Extended Find" flag on any element and then "drag" it to a higher ancestor in the NameMapping for the component to collapse these extra tags.

1 Reply

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Under Tools | Options | Engines | NameMapping, there's an option about Extended Find.  If that's checked, "extra" DIV tags and spans will be "collapsed" if they aren't necessary.  This is useful to an extent.

     

    Personally, I prefer to do this manually.  You can manually check the "Extended Find" flag on any element and then "drag" it to a higher ancestor in the NameMapping for the component to collapse these extra tags.