Forum Discussion

linda_marshall's avatar
linda_marshall
Occasional Contributor
10 years ago
Solved

Identifying objects using ControlID and Wndclass in Keyword Tests

In his Customer Guest Blog - http://blog.smartbear.com/software-quality/automated-test-scripts-a-name-mapping-user-story/ -  Christian Ekiza talks about using ControlID and Wndclass as a pretty reliable way to identify objects.   However, I can only see these properties for BrowserWindow & Window objects.



Am I missing something?
  • What is the nature of your others objects from which you don't see those properties ? It could be that those objects don't have those properties because they're not windows controls, in that case, you should be able if they're not dynamic objects to map them by their names or others properties that don't change like the ClassName property.



5 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Linda,


     


    Make sure that you are using the Advanced View mode in TestComplete's Object Browser:




     


    Basic view doesn't show all properties of objects.


     

  • linda_marshall's avatar
    linda_marshall
    Occasional Contributor
    Re: Tanya's reply - yes, I am using the Advanced View mode in TestComplete's Object Browser.
  • nebti_nassim's avatar
    nebti_nassim
    Occasional Contributor
    What is the nature of your others objects from which you don't see those properties ? It could be that those objects don't have those properties because they're not windows controls, in that case, you should be able if they're not dynamic objects to map them by their names or others properties that don't change like the ClassName property.



  • linda_marshall's avatar
    linda_marshall
    Occasional Contributor
    Thanks Nebti.  



    I now see where I have misunderstood the original article - the clue was in the reference to 'controls'.  



    It seems that the section on 'Developers Help Identify Controls for Automated Test Scripts' was referring to Windows Controls, and not to any type of object. The section on 'Name Mapping Templates Save Time' refers to mapping 'the +1000 controls in the application', so assume these were all Windows Controls. 



    The objects I'm looking at are not Windows controls, so there are no ControlID or Wndclass properties.  I still need to find a way of identifying objects in the application uniquely, but can't see anything obvious (they don't have a value in ClassName). That's something I'll have to work out so will close this query.



    Cheers,



    Linda