[python-win32] Problems with QuickTest Automation Object Model

Dennis Chung chungdr at gmail.com
Wed Sep 9 17:21:50 CEST 2009


That makes sense, the default value of the first parameter is 0 where it
should be None.  I'm assume this is a problem in the COM object definition
in which case I can raise an issue with HP.

o.Test.Run(0)
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    o.Test.Run(0)
  File "<COMObject <unknown>>", line 3, in Run
TypeError: The Python instance can not be converted to a COM object


o.Test.Run(None) is successful as is o.Test.Run(o.Test) or any COM object
reference for that matter.  Looks like the Run method does not report errors
if an incorrect object is passed.

Thanks for all your help!

On Tue, Sep 8, 2009 at 7:30 PM, Tim Roberts <timr at probo.com> wrote:

> Dennis Chung wrote:
> >
> > ----
> >
> > Run method signature:
> > object.Run [ResultsOptions], [WaitOnReturn], [Parameters]
> >
> > Here is the relevant output of makepy for the QTP Type Library:
> > class Test(DispatchBaseClass):
> > ...
> >     def Run(self, ResultsOptions=0, WaitOnReturn=True, Parameters=None):
> >         """Runs the open test or business component and creates
> > results in the specified file or Quality Center path."""
> >         return self._oleobj_.InvokeTypes(15, LCID, 1, (24, 0), ((9,
> > 49), (11, 49), (9, 49)),ResultsOptions
> >             , WaitOnReturn, Parameters)
>
> The three type records are a COM interface, a boolean, and a COM
> interface, returning void.  The parameter you're passing is getting sent
> in as the ResultsOption.  Is there any change if you pass None as the
> first parameter?  (There shouldn't be...)
>
> --
> Tim Roberts, timr at probo.com
> Providenza & Boekelheide, Inc.
>
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20090909/d020ab0e/attachment.htm>


More information about the python-win32 mailing list