Python scripting - way to Initialize IDispatchwrapper shell object
Is there a way to initialize a shell IDispatchwrapper object inside a python script? Can I extend the class (no real need)? .
Code snippet:
def func(string):
shell_idispatcherwapper = <class>
If not isinstance(string, str):
return shell_idispatcherwapper
getAllChildren = Aliases.browser.page.tree.FindAllChildren('ObjectType','ListItem',2,True)
<more code>
shell_idispatcherwapper= getAllChildren
return shell_idispatcherwapper
def callFunction()
obj = function(someObject)
if not obj.Exists:
Log.Error("We failed")
The IDispatchWrapper that is in TestComplete is not a class or object that you can instantiate or do anything with. It's part of the applications methodology for identifying objects. So, if I'm understanding your question, then the answer is: there is no way to initialize the IDispatchwrapper shell object.