morning! thanks for your replies tristaanogre and TanyaYatskovska and sorry i did not respond sooner...
tristaanogre i get the fact that the test object is an object defined by the application under test, however, there are a number of properties and methods that testcomplete adds to that object reference.
what i was hoping to do is just that: add some more properties/methods to the test object, just like the testcomplete engine is doing when it acquires a reference to the object.
so in my example, what i'm trying to do is wrap the test objects with plain old python objects (POPO).
but for convenience, i was hoping to be able to create properties/methods on the POPOs that point to the test object properties/methods, but that have custom names.
i want to be able to reference the properties/methods of test objects but i want to use snake_case for naming in my project, so on the POPO i want to have mapped_name, not MappedName, and type instead of ObjectType.
essentially, what i wanted to do (initially) is to alias existing properties/methods. although, i would also like to add other properties/methods to test objects if this can be done.
i have found many cases where i would like to add customized methods to test objects.
right now i have properties on the POPO that are pointing at the test object's properties/methods. like so.
class AwesomeClass():
name = 'awesome'
test_object = Aliases.TestObject
type = self.test_object.ObjectType
so then i can do this to read the ObjectType property of the test object
awesome = AwesomeClass()
if awesome.type == 'Panel':
...
but what i would like to do is
class AwesomeClass():
name = 'awesome'
test_object = Aliases.TestObject
self_add_type()
def add_type(self):
self.test_object.type = self.test_object.ObjectType
again, what i was hoping to accomplish here is to modify the testobject to suit the way i am working with it, creating custom aliases for existing properties/methods, and also to create custom properties/methods.
this would be helpful and cleaner i think if it is possible.
please share any suggestions you have.
thanks!