cancel
Showing results for 
Search instead for 
Did you mean: 

Test Complete Looses Aliases

SOLVED
Occasional Contributor

Test Complete Looses Aliases

Hello,

I have built alot of tests with Test Complete, however suddenly my aliases have changed inside of the system. For instance:


This:

Aliases.javaw.MainWindow.RootPane.null_layeredPane.null_contentPane.SplitPane.Panel.ToggleButton3.ClickButton(True)

 

Became:

Aliases.java.MainWindow.RootPane.null_layeredPane.null_contentPane.SplitPane.SwingObject("JPanel", "", 0).SwingObject("JToggleButton", "Log Viewer", 3)

 

Im not exactly sure how to proceed all of my tests are now broken and ill need to refactor them to allow for these new paths. Any suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Manager

Re: Test Complete Looses Aliases

@mmccollum , I see.

Glad that you managed to make it work using this workaround. I’ll mark this as a solution for now.  



Sonya Mihaljova
Community and Education Specialist

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!

View solution in original post

7 REPLIES 7
Highlighted
Valued Contributor

Re: Test Complete Looses Aliases

Hi,

Not sure to understand but your first line is a mapped object but your second is not a mapped object, you have for example instance numbers...

assuming all that has changed is the name of the process ("javaw" became "java"), you should open your namemapping and just rename this single thing in the mapping tree.

Highlighted
Occasional Contributor

Re: Test Complete Looses Aliases

What im saying is the path changed quite a bit using the object spy i get this


Aliases.java.MainWindow.RootPane.null_layeredPane.null_contentPane.SplitPane.SwingObject("JPanel", "", 0).SwingObject("JToggleButton", "Current Status", 1)

What i got last time is
Aliases.javaw.MainWindow.RootPane.null_layeredPane.null_contentPane.SplitPane.Panel.ToggleButton3

Highlighted
Community Hero

Re: Test Complete Looses Aliases

Are you relying on the automatic mapping (it looks like it)? If so that will never be reliable. You will have to manually manipulate the attribute used to identify you objects to something that is not dynamic.

 

What it looks like is the panel JPanel for your ToggleButton was mapped with an identifier that is dynamically generated. You also have a full list of aliases that aren't really doing anything for you since you will never interact with things like RootPane, contentPane, etc...

 

If you have't I suggest reading trough the documentation here: https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/index.html as well as watching some of the training videos SmartBear provides. Namemapping takes practice and trial and error to get a solid and reliable mapping setup.


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
Highlighted
Community Leader

Re: Test Complete Looses Aliases

I understand that in your current situation you can't run the test.

Back up your project and run TestComplete with an option where TestComplete itself dynamically updates NameMApping data in the repository and see what the results will be.

 

This option is in:

 

Tools -> options -> Engines -> NameMapping

Highlighted
Community Manager

Re: Test Complete Looses Aliases

Thank you everyone for participation in the discussion. 

 

Hi @mmccollum, did you manage to solve the issue? What approach did you use? 



Sonya Mihaljova
Community and Education Specialist

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!
Highlighted
Occasional Contributor

Re: Test Complete Looses Aliases

Honestly no I havent yet, I went around the problem by using a namemapping file from another instance of test complete that was working and that seems to fixed it for now, however it may not work forever.

Highlighted
Community Manager

Re: Test Complete Looses Aliases

@mmccollum , I see.

Glad that you managed to make it work using this workaround. I’ll mark this as a solution for now.  



Sonya Mihaljova
Community and Education Specialist

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!

View solution in original post