Forum Discussion

ringraham's avatar
ringraham
Contributor
9 years ago
Solved

TestComplete adds number to WPF object

We have a WPF desktop app where some of the object names are having numbers added to them.  For instance, when you record a test and create a CheckProperty test, it saves the objects name as:   hwn...
  • finae's avatar
    9 years ago

    Hi Ron, 

     

    I don't know if this is the same but i've had something like this.

    Our view are generated dynatmically and can have more than one type open at the same time. As well diferent 'version' of teh view also exist and those also can exist multiple times on screen.

     

    I dont know if this will fix your problem but replace the [x] number with *

    other option if you are trying to locate the view via script codes, try using the Find() or FindChild() and use the property "ClrFullClassName"

     

     

    parent.findChild("clrFullClassname","TheFullClassNameOfTheObject",depth)

     

    also to becareful that if you have more than one object, both of these will return the first instance only.

     

    there's also the parent.FindAllChildren("clrFullClassName","thefullclassname",depth)

    and check if you have more than one  using ubound() on the array

     

    .. sorry these are vbscript codes