Test Complete Looses Aliases
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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
