Forum Discussion

prabhjot88singh's avatar
prabhjot88singh
Contributor
6 years ago

How to create Properties file in TestComplete

Dear House,

 

I am looking for steps to create Property class and put all common web object xpaths(stable properties) inside this Properties file.

 

Something similar to selenium, wherein we keep all our common xpaths in property file and call them in our Test scripts.

 

Best,

Prabhjot

  • Hi Prabhjot,

     

    TestComplete differs quite significantly both in architectural concept and in functioning from Selenium.

    XPath is the last resort approach in TestComplete while (properly manually crafted in-advance) NameMapping with Aliases accompanied with considered use of .FindNNN() methods is a recommended approach. (And it is much more flexible and maintainable.)

     

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi Prabhjot,

     

    TestComplete differs quite significantly both in architectural concept and in functioning from Selenium.

    XPath is the last resort approach in TestComplete while (properly manually crafted in-advance) NameMapping with Aliases accompanied with considered use of .FindNNN() methods is a recommended approach. (And it is much more flexible and maintainable.)

     

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      Agreed.  Creating a Properties file is trying to replicate Selenium in TestComplete... which is re-inventing the wheel.  Find the articles on nameMapping and build your repository that way.