Thanks Tim.

I apologize in advance if this doesnt thread properly; I'm on the digest
list and am not sure how to properly reply to individual messages.

I am now able to launch the application via python win32com however I am
still having an issue.  The QuickTest.Application object allows me to run
open test scripts and run as follows:

import win32com.client
o = win32com.client.Dispatch("QuickTest.Application")
o.Launch()
o.Open("V:\tests\mytest")
o.Test.Run(o.Test)

In vbscript, I am able to call the Run method of the Test object without any
parameters and the it appears that "self" is passed implicitly.  Calling Run
without any parameters in python yields:

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

Could it be that python is passing the python instance to Run method rather
than the COM instance?

The Run Method documentation is as follows:

*Syntax*
object.Run [ResultsOptions], [WaitOnReturn], [Parameters]

*Syntax Details*
*Argument - Description *
object - An expression evaluating to an object of type Test.
ResultsOptions Optional. - A RunResultsOptions object. If no
RunResultsOptions object is specified, the default value for the
RunResultsOptions object is used (the results are saved in a unique folder
within the test's or component's folder).
WaitOnReturn Optional. - A Boolean value. Indicates whether the Test.Run
statement waits until the end of the of the run before performing the next
statement in the automation script.  Default=True.

Note: Set this property to False only if the steps following the Test.Run
statement can be performed even while the test or component is running.

Parameters Optional. -  A Parameters object. The Parameters collection
containing the values you want to pass to the test or component.

Return Type
None
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to