Forum Discussion

jthompson1's avatar
jthompson1
Contributor
4 years ago
Solved

Anyone have some really good material for name mapping?

I'm wondering if someone can relate and has gone through what im about to explain but they found a really good write up that educated them about name mapping. I've already gone over the material prov...
  • vinniew's avatar
    4 years ago

    The name mapping guides are in itself quite useful as they show you how to do things like add items, maintain items.

     

    I see you mentioning using xpath solves your issue, You know you can use xpath selectors in the name mapping? 

     

    To do this enable xpath and css for web objects. 

     

    In an existing project 

     

    Click on tools On the Open Applications > Web Testing > General page of the existing project’s Properties page.

     

    Or open a new project all together and enable it. 

     

    Going forward as you record new items, in the the namemapping it will reference the same alias but instead of using object properties it will use xpath and css selectors 

     

    You can remove or add in what ever selectors you want, and as many as you want. 

     

    That way testcomplete will try to find what ever selectors you reference in the name mapping in the order you list them. 

    This is a useful alternative method for web apps. 

     

    This also allows you to scale your web tests using Smartbears Device Cloud, (simply using that web test against a local browser,  connects to the device cloud CBT with thousands of real browser configurations on multiple platforms like IOS,Android, MAC and Windows and run them on those configuration) 

    See 

    https://support.smartbear.com/testcomplete/docs/app-testing/web/cross-platform/index.html

     

    If you dont want to use Device cloud you can still enable that mode for scaling down the line in the future or even leveraging using Xpath and Css selectors  

    See On the https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/xpath-expressions-and-css-selectors.html