Forum Discussion
radov
14 years agoStaff
Hi Kazuya,
If you want to address Silverlight objects by their names (the value of the SlObjectName object property in TestComplete), try to specify unique names for the controls when they are dynamically generated in your application's code (that is, set the Name property for the controls). Otherwise, if you do not specify names for dynamic objects before adding them to the application's layout, TestComplete will be able to address them only by the class name, caption and index passed to the SlObject method (see the "Addressing the Application’s Controls and Objects" section in the Addressing Objects of Silverlight Applications help topic).
Furthermore, you can use the Name Mapping feature to address objects of your application in tests. In this case, you can map a dynamically created control and use some of its unique properties (if any) as name mapping criteria to identify the object. Please see help topics from the Mapping Application Objects and Modifying Mapping Criteria sections for more information about this.
If you want to address Silverlight objects by their names (the value of the SlObjectName object property in TestComplete), try to specify unique names for the controls when they are dynamically generated in your application's code (that is, set the Name property for the controls). Otherwise, if you do not specify names for dynamic objects before adding them to the application's layout, TestComplete will be able to address them only by the class name, caption and index passed to the SlObject method (see the "Addressing the Application’s Controls and Objects" section in the Addressing Objects of Silverlight Applications help topic).
Furthermore, you can use the Name Mapping feature to address objects of your application in tests. In this case, you can map a dynamically created control and use some of its unique properties (if any) as name mapping criteria to identify the object. Please see help topics from the Mapping Application Objects and Modifying Mapping Criteria sections for more information about this.
Related Content
- 13 years ago
Recent Discussions
- 21 hours ago