Forum Discussion

hnarayanan's avatar
11 years ago

TestComplete Objects - Enumerate properties

For the TestComplete objects of processes, windows and controls on the screen - is there a way to enumerate and print out all the properties. I tried the following code and I get a runtime exception:-

    var deskObj = Sys.Desktop; //TC Desktop Object

    var normObj = {a:1, b:2, c:3}; //Normal JScript Object

    for (var prop in normObj)


        Log.Message(normObj[prop]); //1, 2, 3



    for (var prop in deskObj) //Runtime error - Object doesn't support this action




This leads me to believe that TC Objects are not quite JScript objects - so is there a way to convert these to JScript Objects.
  • var x = aqObject.GetProperties( deskObj );

    See documentation here for full explanation


    Phil Baird