cancel
Showing results for 
Search instead for 
Did you mean: 

how to write short name for the object without using 'name mapping' in test complete?

SOLVED
Highlighted
Contributor

how to write short name for the object without using 'name mapping' in test complete?

Currently we are making use of 'Full Name' to develop automation test scripts. The name is too long. We want them to use short. We do not want to rely on Namemapping. Please help us with example

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Manager

Re: how to write short name for the object without using 'name mapping' in test complete?

Thanks for clarifying your request, @DKumar04.

In this case, the following article should help you:

https://support.smartbear.com/testcomplete/docs/app-testing/web/general/common-tasks/finding-objects...

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
5 REPLIES 5
Community Hero

Re: how to write short name for the object without using 'name mapping' in test complete?

Short answer... there is no way.  The "Full Name" is the full hierarchal tree of the parent/child relationships of the object.  Your best bet is to use variables to short it down but that just creates the burden of having to assign a variable every time you want to "rename" the object.

Your BEST answer (and I really don't understand why people are so reluctant to use NameMapping) is to use NameMapping and utilize the Alias feature to shorten the name.


Robert Martin
[Community Expert Group]
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
Extensions available
Community Manager

Re: how to write short name for the object without using 'name mapping' in test complete?

Hi @DKumar04 ,

 

Using variables is the only way for this, as Robert said.

The pseudocode will look like this:

//JScript

var process = Sys.Process(your tested app)
var mainWindow = process.Window.Window
var leftPanel = mainWindow.Object.Object.Panel
var button = leftPanel.Object.Button

Could you please clarify what your use case? Perhaps, we can suggest something else.

 

 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Contributor

Re: how to write short name for the object without using 'name mapping' in test complete?

expecting something like 'relative xpath' as we use in selenium automation.

Community Manager

Re: how to write short name for the object without using 'name mapping' in test complete?

Thanks for clarifying your request, @DKumar04.

In this case, the following article should help you:

https://support.smartbear.com/testcomplete/docs/app-testing/web/general/common-tasks/finding-objects...

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Community Manager

Re: how to write short name for the object without using 'name mapping' in test complete?

Hi @DKumar04,

 

Do the replies you got here help you resolve your question? What solution did you decide to use?

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
New Here?
Join us and watch the welcome video:
Watch the New Interview
APITestingMistake#2
Top Kudoed Authors