cancel
Showing results for 
Search instead for 
Did you mean: 

changes in some control of application, how to manage existing script

Highlighted
Occasional Contributor

changes in some control of application, how to manage existing script

Hi



If there are some changes in the application control:



Say,



1. Change in the name of control

2. Change in some properties like size of the control

3. Replacing the control with some other 3rd party control (say dropdown from 3rd party A was in used when scripting was done. now we replace it with dropdown from 3rd part B)

4. Some other changes which you can think of



How to manage the existing code in each of these scenarios?

In case of scenario1 we can uses Aliases and just edit the alias statement (to edit the name) to make the replay work as earlier right?



What about other scenarios? Do we need to re-record the script?

Please also list other changes in UI which might usually occur and also let me know what is the solution in those cases?



Please reply ASAP.



Thanks,

Laxmi

1 REPLY 1
Highlighted

RE: changes in some control of application, how to manage existing script


Hi laxmi,





Some of the changes can be handled by the corresponding changes of the Mapped Objects and/or Aliases trees. Other changes (e.g. a changed size or color) cannot affect existing tests. However, some significant changes like replacing the control can require modifying existing tests. For example, if the new control has another method for performing an expected action, you will need to modify your tests to make them use the new method. However, in general case, if both old and new controls are supported, even such a change should not make any problems for your tests.





Please also list other changes in UI which might usually occur and also let me know what is the solution in those cases?


A common change in the tested application is moving a control within the object hierarchy. This situation also can be handled by the Name Mapping feature. The Mapped Objects tree is needed to keep links between objects from the actual object tree, which is displayed in the Object Browser panel, and the Aliases tree, which is used by TestComplete when recording tests. The Mapped Objects tree structure is the same as the actual object structure, which makes TestComplete able to link actual objects with their mapping names.





The Aliases tree consists of objects from the Mapped Objects tree, but it does not need to have all of these objects. This means that when you address an object from the Aliases tree in your test, TestComplete finds the corresponding object in the Mapped Objects tree first and then gets the actual object linked to the object from the Mapped Objects tree. If the position of the object in the hierarchy is changed, you need to reflect this change in the Mapped Objects tree while the Aliases tree stays unchanged. As TestComplete uses the Aliases tree to work with objects by default, you will not have to modify your tests.





Please note that to make this work, the initial Aliases tree should be customized before recording tests to get rid of intermediate objects. You can see how to do this on this short video.
--
Dmitry Nikolaev

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:
Announcements
Top Kudoed Authors