Forum Discussion
5 Replies
- Ryan_MoranValued Contributor
Curious if Build 1 and 2 are being done on the same machine?
If not then find the difference between the two machines.
- manjubhaskarpNew Contributor
Yes, it is done on the same machine, apparently the changes are very dynamic in nature so that we can't predict object changes in the future builds until we manually identify the objects.
Ryan_Moran wrote:Curious if Build 1 and 2 are being done on the same machine?
If not then find the difference between the two machines.
- Colin_McCraeCommunity Hero
So they added a new container layer?
ie - SwingObject("PanelDate", "", 0)
There isn't a great deal you can do to mitigate it if it's a completely new layer.
But you can make script maintenance easier (assuming you're using object map + aliases). If you have an Alias set up for the end control you actually interact with (in this case - SwingObject("JFormattedTextField", "", 0)) then I would exclude the new layer from the alias reference. So the reference used in the script would not change. Of course, this assumes that the new PanelDate object is only a container, and not something you would ever reference directly with, or interact direct with, in a script.
Update the object map so the existing alias become valid again. Then you only need to update the map. The alias remains the same. The reference to the alias in all your scripts remains the same. Minimum maintenance. Only possibly if you make good use of aliases.
That's the approach I use and it works well for me.
- schwarzOccasional ContributorYou could try to use the Find method to access objects: https://support.smartbear.com/viewarticle/73101/ As long as e.g. the value of the Name property does not change from one build to another, you can search for the object by its Name property, and you do not have to take care of any changes in the object hierarchy. Regards... Jens
- AlexKaras
Champion Level 2
Hi,
> How are we going to address these kind of challenges in our automation scripts?
If you are using Aliases and Namemapping, consider use of the Extended Find functionality in NameMapping (see help and https://support.smartbear.com/screencasts/testcomplete/reliable-tests-for-dynamic-objects/ from https://support.smartbear.com/screencasts/testcomplete/ for more details).