Names of Silverlight text boxes
My tested application is in Silverlight, and I get this problem.
Assume we have a Silverlight page with several empty text boxes. As long as they remain empty, Object Browser shows their names as 'UIAObject("TextBox")', 'UIAObject("TextBox", 2)', and so on.
But if a text is entered into the text boxes, Object Browser renames them according to the entered text. For example, if I entered "this text" into the first one and then refreshed the Object Browser, the boxes' new names are 'UIAObject("this_text")', 'UIAObject("TextBox")', 'UIAObject("TextBox", 2)' etc.
And I don't even know whether it is a Silverlight or a TestComplete issue. A suggestion for a workaround would be highly appreciated.
Re: Names of Silverlight text boxes
TestComplete uses the Name property to address Silverlight objects using UI Automation. Most likely, in your case, this property changes dynamically according to the text entered to the edit box.
To overcome the issue, you can either map the target text boxes by the "className" (or "LocalizedControlType") and "Top" properties, or use the Find method to get the objects by these properties. Please see the "Name Mapping" and "Find Method" help topics for details.