cancel
Showing results for 
Search instead for 
Did you mean: 

How to create Properties file in TestComplete

SOLVED
Highlighted
Contributor

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

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.)

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

2 REPLIES 2
Highlighted
Community Hero

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.)

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

Highlighted
Community Hero

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.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors