Calling objects directly vs returning objects in a function
Another person and I were hired to do scripting in test complete. How they have it set up is that all the objects are being returned in libraries as function calls example:
function getObject(){
return nameMapping
}
So we create a project of just libraries and we import those libraries into our projects. And when we want to call those objects in a script we say:
libraryName.getObject()
Should we be using objects this way or should we just be calling them directly from the mapping? This way gives us better object manipulation if the object is a string we can just put a cast in our function to always have a object return a certin data type. Or we can maniplulate the object how we want. What is the best way to go about this?
We took a hybrid solution, we incorporated the find and find child functions into our libraries. We still see there is benifit from creating libraries with funcitons returning our objects.